Struct rustc_typeck::middle::ty::TyTraitUnstable [-] [+] [src]

pub struct TyTrait<'tcx> {
    pub principal: Binder<Rc<TraitRef<'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: &'tcx TyS<'tcx>) -> Binder<Rc<TraitRef<'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.

fn projection_bounds_with_self_ty(&self, tcx: &ctxt<'tcx>, self_ty: &'tcx TyS<'tcx>) -> Vec<Binder<ProjectionPredicate<'tcx>>>

Trait Implementations

impl<'tcx> Repr<'tcx> for TyTrait<'tcx>

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

impl<'tcx> UserString<'tcx> for TyTrait<'tcx>

fn user_string(&self, tcx: &ctxt<'tcx>) -> String

Derived Implementations

impl<'tcx> Debug for TyTrait<'tcx>

fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>

impl<'tcx> Hash for TyTrait<'tcx>

fn hash<__H>(&self, __arg_0: &mut __H) where __H: Hasher

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher

impl<'tcx> Eq for TyTrait<'tcx>

impl<'tcx> PartialEq<TyTrait<'tcx>> for TyTrait<'tcx>

fn eq(&self, __arg_0: &TyTrait<'tcx>) -> bool

fn ne(&self, __arg_0: &TyTrait<'tcx>) -> bool

impl<'tcx> Clone for TyTrait<'tcx>

fn clone(&self) -> TyTrait<'tcx>

fn clone_from(&mut self, source: &Self)