[][src]Struct rustc::ty::ProjectionTy

pub struct ProjectionTy<'tcx> {
    pub substs: SubstsRef<'tcx>,
    pub item_def_id: DefId,
}
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Represents the projection of an associated type. In explicit UFCS form this would be written <T as Trait<..>>::N.

Fields

substs: SubstsRef<'tcx>
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

The parameters of the associated item.

item_def_id: DefId
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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<'tcx> ProjectionTy<'tcx>[src]

pub fn from_ref_and_name(
    tcx: TyCtxt,
    trait_ref: TraitRef<'tcx>,
    item_name: Ident
) -> ProjectionTy<'tcx>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Construct a ProjectionTy by searching the trait from trait_ref for the associated item named item_name.

pub fn trait_ref(&self, tcx: TyCtxt<'tcx>) -> TraitRef<'tcx>[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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 an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Trait Implementations

impl<'tcx> Clone for ProjectionTy<'tcx>[src]

impl<'tcx> Copy for ProjectionTy<'tcx>[src]

impl<'tcx> Debug for ProjectionTy<'tcx>[src]

impl<'tcx> Decodable for ProjectionTy<'tcx>[src]

impl<'tcx> Display for ProjectionTy<'tcx>[src]

impl<'tcx> Encodable for ProjectionTy<'tcx>[src]

impl<'tcx> Eq for ProjectionTy<'tcx>[src]

impl<'tcx> Hash for ProjectionTy<'tcx>[src]

impl<'tcx, '__ctx> HashStable<StableHashingContext<'__ctx>> for ProjectionTy<'tcx>[src]

impl<'a, 'tcx> Lift<'tcx> for ProjectionTy<'a>[src]

type Lifted = ProjectionTy<'tcx>

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

impl<'tcx> Ord for ProjectionTy<'tcx>[src]

impl<'tcx> PartialEq<ProjectionTy<'tcx>> for ProjectionTy<'tcx>[src]

impl<'tcx> PartialOrd<ProjectionTy<'tcx>> for ProjectionTy<'tcx>[src]

impl<'tcx, P: PrettyPrinter<'tcx>> Print<'tcx, P> for ProjectionTy<'tcx>[src]

type Output = P

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

type Error = Error

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

impl<'tcx> Relate<'tcx> for ProjectionTy<'tcx>[src]

impl<'tcx> StructuralEq for ProjectionTy<'tcx>[src]

impl<'tcx> StructuralPartialEq for ProjectionTy<'tcx>[src]

impl<'tcx> TypeFoldable<'tcx> for ProjectionTy<'tcx>[src]

Auto Trait Implementations

impl<'tcx> !RefUnwindSafe for ProjectionTy<'tcx>

impl<'tcx> !Send for ProjectionTy<'tcx>

impl<'tcx> !Sync for ProjectionTy<'tcx>

impl<'tcx> Unpin for ProjectionTy<'tcx>

impl<'tcx> !UnwindSafe for ProjectionTy<'tcx>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> ArenaAllocatable for T where
    T: Copy
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<'a, T> Captures<'a> for T where
    T: ?Sized
[src]

impl<T> Decodable for T where
    T: UseSpecializedDecodable
[src]

impl<T> Encodable for T where
    T: UseSpecializedEncodable + ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> Erased for T[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> MaybeResult<T> for T[src]

type Error = !

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

impl<E> SpecializationError for E[src]

impl<'tcx, T> Subst<'tcx> for T where
    T: TypeFoldable<'tcx>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.