Struct rustc_typeck::middle::ty::TraitDefExperimental [-]  [+] [src]

pub struct TraitDef<'tcx> {
    pub unsafety: Unsafety,
    pub generics: Generics<'tcx>,
    pub bounds: ParamBounds<'tcx>,
    pub trait_ref: Rc<TraitRef<'tcx>>,
    pub associated_type_names: Vec<Name>,
}

As TypeScheme but for a trait ref.

Fields

unsafety
generics

Generic type definitions. Note that Self is listed in here as having a single bound, the trait itself (e.g., in the trait Eq, there is a single bound Self : Eq). This is so that default methods get to assume that the Self parameters implements the trait.

bounds

The "supertrait" bounds.

trait_ref
associated_type_names

A list of the associated types defined in this trait. Useful for resolving X::Foo type markers.

Trait Implementations

impl<'tcx> Repr<'tcx> for TraitDef<'tcx>

fn repr(&self, tcx: &ctxt<'tcx>) -> String