Struct rustc_trans::middle::ty::BinderUnstable [-]  [+] [src]

pub struct Binder<T>(pub T);

Binder is a binder for higher-ranked lifetimes. It is part of the compiler's representation for things like for<'a> Fn(&'a int) (which would be represented by the type PolyTraitRef == Binder<TraitRef>). Note that when we skolemize, instantiate, erase, or otherwise "discharge" these bound reons, we change the type from Binder<T> to just T (see e.g. liberate_late_bound_regions).

Methods

impl<'tcx> Binder<FnOutput<'tcx>>

fn diverges(&self) -> bool

impl<'tcx> Binder<FnSig<'tcx>>

fn inputs(&self) -> Binder<Vec<&'tcx TyS<'tcx>>>

fn input(&self, index: usize) -> Binder<&'tcx TyS<'tcx>>

fn output(&self) -> Binder<FnOutput<'tcx>>

fn variadic(&self) -> bool

impl<'tcx> Binder<Rc<TraitRef<'tcx>>>

fn self_ty(&self) -> &'tcx TyS<'tcx>

fn def_id(&self) -> DefId

fn substs(&self) -> &'tcx Substs<'tcx>

fn input_types(&self) -> &[&'tcx TyS<'tcx>]

fn to_poly_trait_predicate(&self) -> Binder<TraitPredicate<'tcx>>

impl<'tcx> Binder<TraitPredicate<'tcx>>

fn def_id(&self) -> DefId

impl<'tcx> Binder<ProjectionPredicate<'tcx>>

fn item_name(&self) -> Name

fn sort_key(&self) -> (DefId, Name)

Trait Implementations

impl<'tcx> Resolvable<'tcx> for Binder<Rc<TraitRef<'tcx>>>

fn resolve(&self, infcx: &InferCtxt<'a, 'tcx>) -> Binder<Rc<TraitRef<'tcx>>>

fn contains_error(&self) -> bool

impl<'tcx> ToPolyTraitRef<'tcx> for Binder<TraitPredicate<'tcx>>

fn to_poly_trait_ref(&self) -> Binder<Rc<TraitRef<'tcx>>>

impl<'tcx> ToPolyTraitRef<'tcx> for Binder<ProjectionPredicate<'tcx>>

fn to_poly_trait_ref(&self) -> Binder<Rc<TraitRef<'tcx>>>

impl<'tcx> AsPredicate<'tcx> for Binder<Rc<TraitRef<'tcx>>>

fn as_predicate(&self) -> Predicate<'tcx>

impl<'tcx> AsPredicate<'tcx> for Binder<EquatePredicate<'tcx>>

fn as_predicate(&self) -> Predicate<'tcx>

impl<'tcx> AsPredicate<'tcx> for Binder<OutlivesPredicate<Region, Region>>

fn as_predicate(&self) -> Predicate<'tcx>

impl<'tcx> AsPredicate<'tcx> for Binder<OutlivesPredicate<&'tcx TyS<'tcx>, Region>>

fn as_predicate(&self) -> Predicate<'tcx>

impl<'tcx> AsPredicate<'tcx> for Binder<ProjectionPredicate<'tcx>>

fn as_predicate(&self) -> Predicate<'tcx>

impl<'tcx, T> RegionEscape for Binder<T> where T: RegionEscape

fn has_regions_escaping_depth(&self, depth: u32) -> bool

fn has_escaping_regions(&self) -> bool

impl<T> HasProjectionTypes for Binder<T> where T: HasProjectionTypes

fn has_projection_types(&self) -> bool

impl<T> ReferencesError for Binder<T> where T: ReferencesError

fn references_error(&self) -> bool

impl<'tcx, T> TypeFoldable<'tcx> for Binder<T> where T: TypeFoldable<'tcx>, T: Repr<'tcx>, T: Clone

fn fold_with<F>(&self, folder: &mut F) -> Binder<T> where F: TypeFolder<'tcx>

impl<'tcx, T> UserString<'tcx> for Binder<T> where T: UserString<'tcx>, T: TypeFoldable<'tcx>

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

impl<'tcx, T> Repr<'tcx> for Binder<T> where T: Repr<'tcx>

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

Derived Implementations

impl<T> Debug for Binder<T> where T: Debug

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

impl<__S, T> Hash<__S> for Binder<T> where __S: Hasher, __S: Writer, T: Hash<__S>

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

impl<T> Eq for Binder<T> where T: Eq

fn assert_receiver_is_total_eq(&self)

impl<T> PartialEq<Binder<T>> for Binder<T> where T: PartialEq<T>

fn eq(&self, __arg_0: &Binder<T>) -> bool

fn ne(&self, __arg_0: &Binder<T>) -> bool

fn ne(&self, &Binder<T>) -> bool

impl<T> Clone for Binder<T> where T: Clone

fn clone(&self) -> Binder<T>

fn clone_from(&mut self, &Binder<T>)