[][src]Struct rustc::ty::subst::UserSelfTy

pub struct UserSelfTy<'tcx> {
    pub impl_def_id: DefId,
    pub self_ty: Ty<'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.

Specifies the user-given self type. In the case of a path that refers to a member in an inherent impl, this self type is sometimes needed to constrain the type parameters on the impl. For example, in this code:

struct Foo<T> { }
impl<A> Foo<A> { fn method() { } }

when you then have a path like <Foo<&'static u32>>::method, this struct would carry the DefId of the impl along with the self type Foo<u32>. Then we can instantiate the parameters of the impl (with the substs from UserSubsts) and apply those to the self type, giving Foo<?A>. Finally, we unify that with the self type here, which contains ?A to be &'static u32

Fields

impl_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.

self_ty: Ty<'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.

Trait Implementations

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

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

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

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

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

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

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

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

impl<'tcx, '__lifted> Lift<'__lifted> for UserSelfTy<'tcx>[src]

type Lifted = UserSelfTy<'__lifted>

⚙️ 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> PartialEq<UserSelfTy<'tcx>> for UserSelfTy<'tcx>[src]

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

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

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

Auto Trait Implementations

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

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

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

impl<'tcx> Unpin for UserSelfTy<'tcx>

impl<'tcx> !UnwindSafe for UserSelfTy<'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, 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.