Struct rustc_lint::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 |