Struct rustc::ty::GeneratorSubsts [−][src]
pub struct GeneratorSubsts<'tcx> { pub substs: &'tcx Substs<'tcx>, }
🔬 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
substs: &'tcx Substs<'tcx>
🔬 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?
Methods
impl<'tcx> GeneratorSubsts<'tcx>
[src]
impl<'tcx> GeneratorSubsts<'tcx>
fn split(self, def_id: DefId, tcx: TyCtxt) -> SplitGeneratorSubsts<'tcx>
[src]
fn split(self, def_id: DefId, tcx: TyCtxt) -> SplitGeneratorSubsts<'tcx>
🔬 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 witness(self, def_id: DefId, tcx: TyCtxt) -> Ty<'tcx>
[src]
pub fn witness(self, def_id: DefId, tcx: TyCtxt) -> Ty<'tcx>
🔬 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 describes the types that can be contained in a generator. It will be a type variable initially and unified in the last stages of typeck of a body. It contains a tuple of all the types that could end up on a generator frame. The state transformation MIR pass may only produce layouts which mention types in this tuple. Upvars are not counted here.
pub fn upvar_tys(self, def_id: DefId, tcx: TyCtxt) -> <'tcx>
[src]
pub fn upvar_tys(self, def_id: DefId, tcx: TyCtxt) -> <'tcx>
🔬 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 yield_ty(self, def_id: DefId, tcx: TyCtxt) -> Ty<'tcx>
[src]
pub fn yield_ty(self, def_id: DefId, tcx: TyCtxt) -> Ty<'tcx>
🔬 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 type representing the yield type of the generator.
pub fn return_ty(self, def_id: DefId, tcx: TyCtxt) -> Ty<'tcx>
[src]
pub fn return_ty(self, def_id: DefId, tcx: TyCtxt) -> Ty<'tcx>
🔬 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 type representing the return type of the generator.
pub fn poly_sig(self, def_id: DefId, tcx: TyCtxt) -> PolyGenSig<'tcx>
[src]
pub fn poly_sig(self, def_id: DefId, tcx: TyCtxt) -> PolyGenSig<'tcx>
🔬 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?
Return the "generator signature", which consists of its yield and return types.
NB. Some bits of the code prefers to see this wrapped in a binder, but it never contains bound regions. Probably this function should be removed.
pub fn sig(self, def_id: DefId, tcx: TyCtxt) -> GenSig<'tcx>
[src]
pub fn sig(self, def_id: DefId, tcx: TyCtxt) -> GenSig<'tcx>
🔬 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?
Return the "generator signature", which consists of its yield and return types.
impl<'a, 'gcx, 'tcx> GeneratorSubsts<'tcx>
[src]
impl<'a, 'gcx, 'tcx> GeneratorSubsts<'tcx>
pub fn state_tys(
self,
def_id: DefId,
tcx: TyCtxt<'a, 'gcx, 'tcx>
) -> <'tcx, 'gcx, 'a>
[src]
pub fn state_tys(
self,
def_id: DefId,
tcx: TyCtxt<'a, 'gcx, 'tcx>
) -> <'tcx, 'gcx, 'a>
🔬 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 returns the types of the MIR locals which had to be stored across suspension points. It is calculated in rustc_mir::transform::generator::StateTransform. All the types here must be in the tuple in GeneratorInterior.
pub fn pre_transforms_tys(
self,
def_id: DefId,
tcx: TyCtxt<'a, 'gcx, 'tcx>
) -> <'tcx, 'a>
[src]
pub fn pre_transforms_tys(
self,
def_id: DefId,
tcx: TyCtxt<'a, 'gcx, 'tcx>
) -> <'tcx, 'a>
🔬 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 the types of the fields of a generate which is available before the generator transformation. It includes the upvars and the state discriminant which is u32.
pub fn field_tys(
self,
def_id: DefId,
tcx: TyCtxt<'a, 'gcx, 'tcx>
) -> <'tcx, 'gcx, 'a>
[src]
pub fn field_tys(
self,
def_id: DefId,
tcx: TyCtxt<'a, 'gcx, 'tcx>
) -> <'tcx, 'gcx, 'a>
🔬 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 the types of all the fields stored in a generator. It includes the upvars, state types and the state discriminant which is u32.
Trait Implementations
impl<'a, 'tcx> HashStable<StableHashingContext<'a>> for GeneratorSubsts<'tcx>
[src]
impl<'a, 'tcx> HashStable<StableHashingContext<'a>> for GeneratorSubsts<'tcx>
fn hash_stable<W: StableHasherResult>(
&self,
__ctx: &mut StableHashingContext<'a>,
__hasher: &mut StableHasher<W>
)
[src]
fn hash_stable<W: StableHasherResult>(
&self,
__ctx: &mut StableHashingContext<'a>,
__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?
impl<'tcx> Relate<'tcx> for GeneratorSubsts<'tcx>
[src]
impl<'tcx> Relate<'tcx> for GeneratorSubsts<'tcx>
fn relate<'a, 'gcx, R>(
relation: &mut R,
a: &GeneratorSubsts<'tcx>,
b: &GeneratorSubsts<'tcx>
) -> RelateResult<'tcx, GeneratorSubsts<'tcx>> where
R: TypeRelation<'a, 'gcx, 'tcx>,
'gcx: 'a + 'tcx,
'tcx: 'a,
[src]
fn relate<'a, 'gcx, R>(
relation: &mut R,
a: &GeneratorSubsts<'tcx>,
b: &GeneratorSubsts<'tcx>
) -> RelateResult<'tcx, GeneratorSubsts<'tcx>> where
R: TypeRelation<'a, 'gcx, 'tcx>,
'gcx: 'a + 'tcx,
'tcx: 'a,
🔬 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?
impl<'a, 'tcx> Lift<'tcx> for GeneratorSubsts<'a>
[src]
impl<'a, 'tcx> Lift<'tcx> for GeneratorSubsts<'a>
type Lifted = GeneratorSubsts<'tcx>
🔬 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 lift_to_tcx<'b, 'gcx>(
&self,
tcx: TyCtxt<'b, 'gcx, 'tcx>
) -> Option<Self::Lifted>
[src]
fn lift_to_tcx<'b, 'gcx>(
&self,
tcx: TyCtxt<'b, 'gcx, 'tcx>
) -> Option<Self::Lifted>
🔬 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?
impl<'tcx> TypeFoldable<'tcx> for GeneratorSubsts<'tcx>
[src]
impl<'tcx> TypeFoldable<'tcx> for GeneratorSubsts<'tcx>
fn super_fold_with<'gcx: 'tcx, V: TypeFolder<'gcx, 'tcx>>(
&self,
folder: &mut V
) -> Self
[src]
fn super_fold_with<'gcx: 'tcx, V: TypeFolder<'gcx, 'tcx>>(
&self,
folder: &mut V
) -> Self
🔬 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 super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> bool
[src]
fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> 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 fold_with<'gcx: 'tcx, F: TypeFolder<'gcx, 'tcx>>(
&self,
folder: &mut F
) -> Self
[src]
fn fold_with<'gcx: 'tcx, F: TypeFolder<'gcx, 'tcx>>(
&self,
folder: &mut F
) -> Self
🔬 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_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> bool
[src]
fn visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> 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 has_regions_bound_at_or_above(&self, binder: DebruijnIndex) -> bool
[src]
fn has_regions_bound_at_or_above(&self, binder: DebruijnIndex) -> 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?
True if self
has any late-bound regions that are either bound by binder
or bound by some binder outside of binder
. If binder
is ty::INNERMOST
, this indicates whether there are any late-bound regions that appear free. Read more
fn has_regions_bound_above(&self, binder: DebruijnIndex) -> bool
[src]
fn has_regions_bound_above(&self, binder: DebruijnIndex) -> 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?
True if this self
has any regions that escape binder
(and hence are not bound by it). Read more
fn has_escaping_regions(&self) -> bool
[src]
fn has_escaping_regions(&self) -> 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 has_type_flags(&self, flags: TypeFlags) -> bool
[src]
fn has_type_flags(&self, flags: TypeFlags) -> 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 has_projections(&self) -> bool
[src]
fn has_projections(&self) -> 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 references_error(&self) -> bool
[src]
fn references_error(&self) -> 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 has_param_types(&self) -> bool
[src]
fn has_param_types(&self) -> 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 has_self_ty(&self) -> bool
[src]
fn has_self_ty(&self) -> 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 has_infer_types(&self) -> bool
[src]
fn has_infer_types(&self) -> 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 needs_infer(&self) -> bool
[src]
fn needs_infer(&self) -> 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 has_skol(&self) -> bool
[src]
fn has_skol(&self) -> 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 needs_subst(&self) -> bool
[src]
fn needs_subst(&self) -> 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 has_re_skol(&self) -> bool
[src]
fn has_re_skol(&self) -> 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 has_closure_types(&self) -> bool
[src]
fn has_closure_types(&self) -> 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 has_free_regions(&self) -> bool
[src]
fn has_free_regions(&self) -> 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?
"Free" regions in this context means that it has any region that is not (a) erased or (b) late-bound. Read more
fn has_erasable_regions(&self) -> bool
[src]
fn has_erasable_regions(&self) -> 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?
True if there any any un-erased free regions.
fn is_global(&self) -> bool
[src]
fn is_global(&self) -> 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?
Indicates whether this value references only 'global' types/lifetimes that are the same regardless of what fn we are in. This is used for caching. Read more
fn has_late_bound_regions(&self) -> bool
[src]
fn has_late_bound_regions(&self) -> 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?
True if there are any late-bound regions
fn visit_tys_shallow(
&self,
visit: impl FnMut(Ty<'tcx>) -> bool
) -> bool
[src]
fn visit_tys_shallow(
&self,
visit: impl FnMut(Ty<'tcx>) -> bool
) -> 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?
A visitor that does not recurse into types, works like fn walk_shallow
in Ty
.
impl<'tcx> Copy for GeneratorSubsts<'tcx>
[src]
impl<'tcx> Copy for GeneratorSubsts<'tcx>
impl<'tcx> Clone for GeneratorSubsts<'tcx>
[src]
impl<'tcx> Clone for GeneratorSubsts<'tcx>
fn clone(&self) -> GeneratorSubsts<'tcx>
[src]
fn clone(&self) -> GeneratorSubsts<'tcx>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<'tcx> PartialEq for GeneratorSubsts<'tcx>
[src]
impl<'tcx> PartialEq for GeneratorSubsts<'tcx>
fn eq(&self, other: &GeneratorSubsts<'tcx>) -> bool
[src]
fn eq(&self, other: &GeneratorSubsts<'tcx>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &GeneratorSubsts<'tcx>) -> bool
[src]
fn ne(&self, other: &GeneratorSubsts<'tcx>) -> bool
This method tests for !=
.
impl<'tcx> Eq for GeneratorSubsts<'tcx>
[src]
impl<'tcx> Eq for GeneratorSubsts<'tcx>
fn assert_receiver_is_total_eq(&self)
[src]
fn assert_receiver_is_total_eq(&self)
impl<'tcx> PartialOrd for GeneratorSubsts<'tcx>
[src]
impl<'tcx> PartialOrd for GeneratorSubsts<'tcx>
fn partial_cmp(&self, other: &GeneratorSubsts<'tcx>) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &GeneratorSubsts<'tcx>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &GeneratorSubsts<'tcx>) -> bool
[src]
fn lt(&self, other: &GeneratorSubsts<'tcx>) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &GeneratorSubsts<'tcx>) -> bool
[src]
fn le(&self, other: &GeneratorSubsts<'tcx>) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &GeneratorSubsts<'tcx>) -> bool
[src]
fn gt(&self, other: &GeneratorSubsts<'tcx>) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &GeneratorSubsts<'tcx>) -> bool
[src]
fn ge(&self, other: &GeneratorSubsts<'tcx>) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<'tcx> Ord for GeneratorSubsts<'tcx>
[src]
impl<'tcx> Ord for GeneratorSubsts<'tcx>
fn cmp(&self, other: &GeneratorSubsts<'tcx>) -> Ordering
[src]
fn cmp(&self, other: &GeneratorSubsts<'tcx>) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl<'tcx> Hash for GeneratorSubsts<'tcx>
[src]
impl<'tcx> Hash for GeneratorSubsts<'tcx>
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<'tcx> Debug for GeneratorSubsts<'tcx>
[src]
impl<'tcx> Debug for GeneratorSubsts<'tcx>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<'tcx> Encodable for GeneratorSubsts<'tcx>
[src]
impl<'tcx> Encodable for GeneratorSubsts<'tcx>
fn encode<__S: Encoder>(&self, s: &mut __S) -> Result<(), __S::Error>
[src]
fn encode<__S: Encoder>(&self, s: &mut __S) -> Result<(), __S::Error>
🔬 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?
impl<'tcx> Decodable for GeneratorSubsts<'tcx>
[src]
impl<'tcx> Decodable for GeneratorSubsts<'tcx>
Auto Trait Implementations
impl<'tcx> !Send for GeneratorSubsts<'tcx>
impl<'tcx> !Send for GeneratorSubsts<'tcx>
impl<'tcx> !Sync for GeneratorSubsts<'tcx>
impl<'tcx> !Sync for GeneratorSubsts<'tcx>