Struct rustc_trans::middle::ty::TyTrait
[−]
[src]
pub struct TyTrait<'tcx> {
pub principal: Binder<TraitRef<'tcx>>,
pub bounds: ExistentialBounds<'tcx>,
}Unstable
Fields
principal | Unstable |
bounds | Unstable |
Methods
impl<'tcx> TyTrait<'tcx>
fn principal_def_id(&self) -> DefId
Unstable
fn principal_trait_ref_with_self_ty(&self, tcx: &ctxt<'tcx>, self_ty: &'tcx TyS<'tcx>) -> Binder<TraitRef<'tcx>>
Unstable
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>>>
Unstable