Trait rustc::middle::typeck::astconv::AstConvExperimental [-]  [+] [src]

pub trait AstConv<'tcx> {
    fn tcx<'a>(&'a self) -> &'a ctxt<'tcx>;
    fn get_item_ty(&self, id: DefId) -> Polytype;
    fn get_trait_def(&self, id: DefId) -> Rc<TraitDef>;
    fn ty_infer(&self, span: Span) -> t;
    fn associated_types_of_trait_are_valid(&self, ty: t, trait_id: DefId) -> bool;
    fn associated_type_binding(&self, span: Span, ty: Option<t>, trait_id: DefId, associated_type_id: DefId) -> t;
}

Required Methods

fn tcx<'a>(&'a self) -> &'a ctxt<'tcx>

fn get_item_ty(&self, id: DefId) -> Polytype

fn get_trait_def(&self, id: DefId) -> Rc<TraitDef>

fn ty_infer(&self, span: Span) -> t

What type should we use when a type is omitted?

fn associated_types_of_trait_are_valid(&self, ty: t, trait_id: DefId) -> bool

Returns true if associated types from the given trait and type are allowed to be used here and false otherwise.

fn associated_type_binding(&self, span: Span, ty: Option<t>, trait_id: DefId, associated_type_id: DefId) -> t

Returns the binding of the given associated type for some type.

Implementors