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

pub struct InstantiatedPredicates<'tcx> {
    pub predicates: VecPerParamSpace<Predicate<'tcx>>,
}

Represents the bounds declared on a particular set of type parameters. Should eventually be generalized into a flag list of where clauses. You can obtain a InstantiatedPredicates list from a GenericPredicates by using the instantiate method. Note that this method reflects an important semantic invariant of InstantiatedPredicates: while the GenericPredicates are expressed in terms of the bound type parameters of the impl/trait/whatever, an InstantiatedPredicates instance represented a set of bounds for some particular instantiation, meaning that the generic parameters have been substituted with their values.

Example:

struct Foo<T,U:Bar<T>> { ... }

Here, the GenericPredicates for Foo would contain a list of bounds like [[], [U:Bar<T>]]. Now if there were some particular reference like Foo<isize,usize>, then the InstantiatedPredicates would be [[], [usize:Bar<isize>]].

Fields

predicates

Methods

impl<'tcx> InstantiatedPredicates<'tcx>

fn empty() -> InstantiatedPredicates<'tcx>

fn has_escaping_regions(&self) -> bool

fn is_empty(&self) -> bool

Trait Implementations

impl<'tcx> HasProjectionTypes for InstantiatedPredicates<'tcx>

fn has_projection_types(&self) -> bool

impl<'tcx> TypeFoldable<'tcx> for InstantiatedPredicates<'tcx>

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

impl<'tcx> Repr<'tcx> for InstantiatedPredicates<'tcx>

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

Derived Implementations

impl<'tcx> Debug for InstantiatedPredicates<'tcx>

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

impl<'tcx> Clone for InstantiatedPredicates<'tcx>

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

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