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

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

Required Methods

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

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

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

fn ty_infer(&self, span: Span) -> &'tcx TyS<'tcx>

What type should we use when a type is omitted?

fn associated_types_of_trait_are_valid(&self, ty: &'tcx TyS<'tcx>, 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<&'tcx TyS<'tcx>>, trait_id: DefId, associated_type_id: DefId) -> &'tcx TyS<'tcx>

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

Implementors