Struct rustc::middle::ty::TyTraitUnstable
[-] [+]
[src]
pub struct TyTrait<'tcx> { pub principal: PolyTraitRef<'tcx>, pub bounds: ExistentialBounds<'tcx>, }
Fields
principal | |
bounds |
Methods
impl<'tcx> TyTrait<'tcx>
fn principal_def_id(&self) -> DefId
fn principal_trait_ref_with_self_ty(&self, tcx: &ctxt<'tcx>, self_ty: Ty<'tcx>) -> PolyTraitRef<'tcx>
Object types don't have a self-type specified. Therefore, when
we convert the principal trait-ref into a normal trait-ref,
you must give some self-type. A common choice is mk_err()
or some skolemized type.