Struct rustc::ty::fold::HasEscapingRegionsVisitor [−][src]
struct HasEscapingRegionsVisitor { depth: u32, }
🔬 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?
An "escaping region" is a bound region whose binder is not part of t
.
So, for example, consider a type like the following, which has two binders:
for<'a> fn(x: for<'b> fn(&'a isize, &'b isize)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ outer scope ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ inner scope
This type has bound regions ('a
, 'b
), but it does not have escaping regions, because the
binders of both 'a
and 'b
are part of the type itself. However, if we consider the inner
fn type, that type has an escaping region: 'a
.
Note that what I'm calling an "escaping region" is often just called a "free region". However, we already use the term "free region". It refers to the regions that we use to represent bound regions on a fn definition while we are typechecking its body.
To clarify, conceptually there is no particular difference between an "escaping" region and a "free" region. However, there is a big difference in practice. Basically, when "entering" a binding level, one is generally required to do some sort of processing to a bound region, such as replacing it with a fresh/skolemized region, or making an entry in the environment to represent the scope to which it is attached, etc. An escaping region represents a bound region for which this processing has not yet been done.
Fields
depth: u32
🔬 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?
Trait Implementations
impl<'tcx> TypeVisitor<'tcx> for HasEscapingRegionsVisitor
[src]
impl<'tcx> TypeVisitor<'tcx> for HasEscapingRegionsVisitor
fn visit_binder<T: TypeFoldable<'tcx>>(&mut self, t: &Binder<T>) -> bool
[src]
fn visit_binder<T: TypeFoldable<'tcx>>(&mut self, t: &Binder<T>) -> bool
🔬 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?
fn visit_ty(&mut self, t: Ty<'tcx>) -> bool
[src]
fn visit_ty(&mut self, t: Ty<'tcx>) -> bool
🔬 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?
fn visit_region(&mut self, r: Region<'tcx>) -> bool
[src]
fn visit_region(&mut self, r: Region<'tcx>) -> bool
🔬 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?
fn visit_const(&mut self, c: &'tcx Const<'tcx>) -> bool
[src]
fn visit_const(&mut self, c: &'tcx Const<'tcx>) -> bool
🔬 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?
Auto Trait Implementations
impl Send for HasEscapingRegionsVisitor
impl Send for HasEscapingRegionsVisitor
impl Sync for HasEscapingRegionsVisitor
impl Sync for HasEscapingRegionsVisitor