Struct rustc_mir::build::scope::Scope[][src]

pub struct Scope<'tcx> {
    visibility_scope: VisibilityScope,
    region_scope: Scope,
    region_scope_span: Span,
    needs_cleanup: bool,
    drops: Vec<DropData<'tcx>>,
    cached_exits: FxHashMap<(BasicBlock, Scope), BasicBlock>,
    cached_generator_drop: Option<BasicBlock>,
    cached_unwind: CachedBlock,
}
🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Fields

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

The visibility scope this scope was created in.

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

the region span of this scope within source code.

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

the span of that region_scope

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Whether there's anything to do for the cleanup path, that is, when unwinding through this scope. This includes destructors, but not StorageDead statements, which don't get emitted at all for unwinding, for several reasons:

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

set of places to drop when exiting this scope. This starts out empty but grows as variables are declared during the building process. This is a stack, so we always drop from the end of the vector (top of the stack) first.

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

The cache for drop chain on “normal” exit into a particular BasicBlock.

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

The cache for drop chain on "generator drop" exit.

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

The cache for drop chain on "unwind" exit.

Methods

impl<'tcx> Scope<'tcx>
[src]

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Invalidate all the cached blocks in the scope.

Should always be run for all inner scopes when a drop is pushed into some scope enclosing a larger extent of code.

storage_only controls whether to invalidate only drop paths run StorageDead. this_scope_only controls whether to invalidate only drop paths that refer to the current top-of-scope (as opposed to dependent scopes).

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Given a span and this scope's visibility scope, make a SourceInfo.

Trait Implementations

impl<'tcx> Debug for Scope<'tcx>
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<'tcx> !Send for Scope<'tcx>

impl<'tcx> !Sync for Scope<'tcx>