🔬 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?
After we borrow check a closure, we are left with various
requirements that we have inferred between the free regions that
appear in the closure's signature or on its field types. These
requirements are then verified and proved by the closure's
creating function. This struct encodes those requirements.
The requirements are listed as being between various
RegionVid
. The 0th region refers to 'static
; subsequent region
vids refer to the free regions that appear in the closure (or
generator's) type, in order of appearance. (This numbering is
actually defined by the UniversalRegions
struct in the NLL
region checker. See for example
UniversalRegions::closure_mapping
.) Note that we treat the free
regions in the closure's type "as if" they were erased, so their
precise identity is not important, only their position.
Example: If type check produces a closure with the closure substs:
ClosureSubsts = [
i8, // the "closure kind"
for<'x> fn(&'a &'x u32) -> &'x u32, // the "closure signature"
&'a String, // some upvar
]
here, there is one unique free region ('a
) but it appears
twice. We would "renumber" each occurrence to a unique vid, as follows:
ClosureSubsts = [
i8, // the "closure kind"
for<'x> fn(&'1 &'x u32) -> &'x u32, // the "closure signature"
&'2 String, // some upvar
]
Now the code might impose a requirement like '1: '2
. When an
instance of the closure is created, the corresponding free regions
can be extracted from its type and constrained to have the given
outlives relationship.
In some cases, we have to record outlives requirements between
types and regions as well. In that case, if those types include
any regions, those regions are recorded as ReClosureBound
instances assigned one of these same indices. Those regions will
be substituted away by the creator. We use ReClosureBound
in
that case because the regions must be allocated in the global
TyCtxt, and hence we cannot use ReVar
(which is what we use
internally within the rest of the NLL 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 number of external regions defined on the closure. In our
example above, it would be 3 -- one for 'static
, then '1
and '2
. This is just used for a sanity check later on, to
make sure that the number of regions we see at the callsite
matches.
🔬 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?
Requirements between the various free regions defined in
indices.
🔬 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?
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
🔬 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?
🔬 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?
🔬 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?
🔬 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?
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
🔬 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?
🔬 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?
🔬 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?
Create an error for a missing method specialization. Defaults to panicking with type, trait & method names. S
is the encoder/decoder state type, T
is the type being encoded/decoded, and the arguments are the names of the trait and method that should've been overridden. Read more