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<'tcx>;
fn get_trait_def(&self, id: DefId) -> Rc<TraitDef<'tcx>>;
fn ty_infer(&self, span: Span) -> Ty<'tcx>;
fn associated_types_of_trait_are_valid(&self, ty: Ty<'tcx>, trait_id: DefId) -> bool;
fn associated_type_binding(&self, span: Span, ty: Option<Ty<'tcx>>, trait_id: DefId, associated_type_id: DefId) -> Ty<'tcx>;
}
Required Methods
fn tcx<'a>(&'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) -> Ty<'tcx>
What type should we use when a type is omitted?
fn associated_types_of_trait_are_valid(&self, ty: Ty<'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<Ty<'tcx>>, trait_id: DefId, associated_type_id: DefId) -> Ty<'tcx>
Returns the binding of the given associated type for some type.