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

pub struct TraitDef {
    pub generics: Generics,
    pub bounds: ParamBounds,
    pub trait_ref: Rc<TraitRef>,
}

As Polytype but for a trait ref.

Fields

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

Trait Implementations

impl Repr for TraitDef

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