Struct rustc::middle::region::ScopeTree
[−]
[src]
pub struct ScopeTree { /* fields omitted */ }
🔬 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 scope tree encodes information about region relationships.
Methods
impl<'tcx> ScopeTree
[src]
pub fn record_scope_parent(&mut self, child: Scope, parent: Option<Scope>)
[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?
pub fn each_encl_scope<E>(&self, e: E) where
E: FnMut(Scope, Scope),
[src]
E: FnMut(Scope, 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?
pub fn each_var_scope<E>(&self, e: E) where
E: FnMut(&ItemLocalId, Scope),
[src]
E: FnMut(&ItemLocalId, 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?
pub fn opt_destruction_scope(&self, n: ItemLocalId) -> Option<Scope>
[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?
pub fn opt_encl_scope(&self, id: Scope) -> Option<Scope>
[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?
Returns the narrowest scope that encloses id
, if any.
pub fn encl_scope(&self, id: Scope) -> Scope
[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?
Returns the narrowest scope that encloses id
, if any.
pub fn var_scope(&self, var_id: ItemLocalId) -> Scope
[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?
Returns the lifetime of the local variable var_id
pub fn temporary_scope(&self, expr_id: ItemLocalId) -> Option<Scope>
[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?
Returns the scope when temp created by expr_id will be cleaned up
pub fn var_region(&self, id: ItemLocalId) -> RegionKind
[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?
Returns the lifetime of the variable id
.
pub fn scopes_intersect(&self, scope1: Scope, scope2: Scope) -> bool
[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?
pub fn is_subscope_of(&self, subscope: Scope, superscope: Scope) -> bool
[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?
Returns true if subscope
is equal to or is lexically nested inside superscope
and false
otherwise.
pub fn nearest_common_ancestor(&self, scope_a: Scope, scope_b: Scope) -> Scope
[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?
Finds the nearest common ancestor (if any) of two scopes. That is, finds the smallest
scope which is greater than or equal to both scope_a
and scope_b
.
pub fn early_free_scope<'a, 'gcx>(
&self,
tcx: TyCtxt<'a, 'gcx, 'tcx>,
br: &EarlyBoundRegion
) -> Scope
[src]
&self,
tcx: TyCtxt<'a, 'gcx, 'tcx>,
br: &EarlyBoundRegion
) -> 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?
Assuming that the provided region was defined within this ScopeTree
,
returns the outermost Scope
that the region outlives.
pub fn free_scope<'a, 'gcx>(
&self,
tcx: TyCtxt<'a, 'gcx, 'tcx>,
fr: &FreeRegion
) -> Scope
[src]
&self,
tcx: TyCtxt<'a, 'gcx, 'tcx>,
fr: &FreeRegion
) -> 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?
Assuming that the provided region was defined within this ScopeTree
,
returns the outermost Scope
that the region outlives.
pub fn yield_in_scope(&self, scope: Scope) -> Option<(Span, usize)>
[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?
Checks whether the given scope contains a yield
. If so,
returns Some((span, expr_count))
with the span of a yield we found and
the number of expressions appearing before the yield
in the body.
pub fn body_expr_count(&self, body_id: BodyId) -> Option<usize>
[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?
Gives the number of expressions visited in a body. Used to sanity check visit_expr call count when calculating generator interiors.
Trait Implementations
impl Default for ScopeTree
[src]
impl Debug for ScopeTree
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<'gcx> HashStable<StableHashingContext<'gcx>> for ScopeTree
[src]
fn hash_stable<W: StableHasherResult>(
&self,
hcx: &mut StableHashingContext<'gcx>,
hasher: &mut StableHasher<W>
)
[src]
&self,
hcx: &mut StableHashingContext<'gcx>,
hasher: &mut StableHasher<W>
)
🔬 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?