[][src]Struct rustc::ty::trait_def::TraitDef

pub struct TraitDef {
    pub def_id: DefId,
    pub unsafety: Unsafety,
    pub paren_sugar: bool,
    pub has_auto_impl: bool,
    pub is_marker: bool,
    pub def_path_hash: DefPathHash,
}
⚙️ 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.

A trait's definition with type information.

Fields

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.

unsafety: Unsafety
⚙️ 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.

paren_sugar: bool
⚙️ 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.

If true, then this trait had the #[rustc_paren_sugar] attribute, indicating that it should be used with Foo() sugar. This is a temporary thing -- eventually any trait will be usable with the sugar (or without it).

has_auto_impl: bool
⚙️ 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.

is_marker: bool
⚙️ 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.

If true, then this trait has the #[marker] attribute, indicating that all its associated items have defaults that cannot be overridden, and thus impls of it are allowed to overlap.

def_path_hash: DefPathHash
⚙️ 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 ICH of this trait's DefPath, cached here so it doesn't have to be recomputed all the time.

Methods

impl<'tcx> TraitDef[src]

pub fn new(
    def_id: DefId,
    unsafety: Unsafety,
    paren_sugar: bool,
    has_auto_impl: bool,
    is_marker: bool,
    def_path_hash: DefPathHash
) -> TraitDef
[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.

Important traits for Ancestors<'_>
pub fn ancestors(&self, tcx: TyCtxt<'tcx>, of_impl: DefId) -> Ancestors<'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 ArenaAllocatable for TraitDef[src]

impl<'tcx> ArenaField<'tcx> for TraitDef[src]

impl Debug for TraitDef[src]

impl<'__ctx> HashStable<StableHashingContext<'__ctx>> for TraitDef[src]

Auto Trait Implementations

impl Sync for TraitDef

impl Send for TraitDef

impl Unpin for TraitDef

impl RefUnwindSafe for TraitDef

impl UnwindSafe for TraitDef

Blanket Implementations

impl<T> ArenaAllocatable for T where
    T: Copy
[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<'a, T> Captures<'a> for T where
    T: ?Sized
[src]

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[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.

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

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

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

impl<E> SpecializationError for E[src]

impl<T> Erased for T[src]

impl<T> Erased for T