Struct rustc_typeck::middle::ty::TyTraitExperimental [-]  [+] [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

Derived Implementations

impl<'tcx> Show for TyTrait<'tcx>

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

impl<'tcx, __S: Writer> Hash<__S> for TyTrait<'tcx>

fn hash(&self, __arg_0: &mut __S)

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

fn assert_receiver_is_total_eq(&self)

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

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

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

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

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

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

fn clone_from(&mut self, &TyTrait<'tcx>)