Struct rustc::ty::ProjectionTy
[−]
[src]
pub struct ProjectionTy<'tcx> { pub substs: &'tcx Substs<'tcx>, pub item_def_id: DefId, }
🔬 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?
Represents the projection of an associated type. In explicit UFCS
form this would be written <T as Trait<..>>::N
.
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?
The parameters of the associated item.
item_def_id: DefId
🔬 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 DefId of the TraitItem for the associated type N.
Note that this is not the DefId of the TraitRef containing this associated type, which is in tcx.associated_item(item_def_id).container.
Methods
impl<'a, 'tcx> ProjectionTy<'tcx>
[src]
pub fn from_ref_and_name(
tcx: TyCtxt,
trait_ref: TraitRef<'tcx>,
item_name: Name
) -> ProjectionTy<'tcx>
[src]
tcx: TyCtxt,
trait_ref: TraitRef<'tcx>,
item_name: Name
) -> ProjectionTy<'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?
Construct a ProjectionTy by searching the trait from trait_ref for the associated item named item_name.
pub fn trait_ref(&self, tcx: TyCtxt) -> TraitRef<'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?
Extracts the underlying trait reference from this projection.
For example, if this is a projection of <T as Iterator>::Item
,
then this function would return a T: Iterator
trait reference.
pub fn self_ty(&self) -> Ty<'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?
Trait Implementations
impl<'tcx> HashStable<StableHashingContext<'tcx>> for ProjectionTy<'tcx>
[src]
fn hash_stable<W: StableHasherResult>(
&self,
__ctx: &mut StableHashingContext<'tcx>,
__hasher: &mut StableHasher<W>
)
[src]
&self,
__ctx: &mut StableHashingContext<'tcx>,
__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 ProjectionTy<'tcx>
[src]
fn relate<'a, 'gcx, R>(
relation: &mut R,
a: &ProjectionTy<'tcx>,
b: &ProjectionTy<'tcx>
) -> RelateResult<'tcx, ProjectionTy<'tcx>> where
R: TypeRelation<'a, 'gcx, 'tcx>,
'gcx: 'a + 'tcx,
'tcx: 'a,
[src]
relation: &mut R,
a: &ProjectionTy<'tcx>,
b: &ProjectionTy<'tcx>
) -> RelateResult<'tcx, ProjectionTy<'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 ProjectionTy<'a>
[src]
type Lifted = ProjectionTy<'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<ProjectionTy<'tcx>>
[src]
&self,
tcx: TyCtxt<'b, 'gcx, 'tcx>
) -> Option<ProjectionTy<'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?
impl<'tcx> TypeFoldable<'tcx> for ProjectionTy<'tcx>
[src]
fn super_fold_with<'gcx: 'tcx, V: TypeFolder<'gcx, 'tcx>>(
&self,
folder: &mut V
) -> Self
[src]
&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]
🔬 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]
&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]
🔬 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_escaping_depth(&self, depth: u32) -> 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?
fn has_escaping_regions(&self) -> 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?
fn has_type_flags(&self, flags: TypeFlags) -> 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?
fn has_projections(&self) -> 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?
fn references_error(&self) -> 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?
fn has_param_types(&self) -> 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?
fn has_self_ty(&self) -> 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?
fn has_infer_types(&self) -> 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?
fn needs_infer(&self) -> 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?
fn needs_subst(&self) -> 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?
fn has_re_skol(&self) -> 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?
fn has_closure_types(&self) -> 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?
fn has_erasable_regions(&self) -> 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?
fn is_normalized_for_trans(&self) -> 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?
fn is_global(&self) -> 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?
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. Errs on the side of returning false. Read more
impl<'tcx> Copy for ProjectionTy<'tcx>
[src]
impl<'tcx> Clone for ProjectionTy<'tcx>
[src]
fn clone(&self) -> ProjectionTy<'tcx>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'tcx> PartialEq for ProjectionTy<'tcx>
[src]
fn eq(&self, __arg_0: &ProjectionTy<'tcx>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &ProjectionTy<'tcx>) -> bool
[src]
This method tests for !=
.
impl<'tcx> Eq for ProjectionTy<'tcx>
[src]
impl<'tcx> Hash for ProjectionTy<'tcx>
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
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]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<'tcx> Debug for ProjectionTy<'tcx>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<'tcx> Encodable for ProjectionTy<'tcx>
[src]
fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>
[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?
impl<'tcx> Decodable for ProjectionTy<'tcx>
[src]
fn decode<__D: Decoder>(
__arg_0: &mut __D
) -> Result<ProjectionTy<'tcx>, __D::Error>
[src]
__arg_0: &mut __D
) -> Result<ProjectionTy<'tcx>, __D::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> Print for ProjectionTy<'tcx>
[src]
fn print<F: Write>(&self, f: &mut F, cx: &mut PrintContext) -> Result
[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?
fn print_to_string(&self, cx: &mut PrintContext) -> String
[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?
fn print_display<F: Write>(&self, f: &mut F, cx: &mut PrintContext) -> Result
[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?
fn print_display_to_string(&self, cx: &mut PrintContext) -> String
[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?
fn print_debug<F: Write>(&self, f: &mut F, cx: &mut PrintContext) -> Result
[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?
fn print_debug_to_string(&self, cx: &mut PrintContext) -> String
[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?