Struct rustc::middle::ty::GenericBoundsExperimental
[-]
[+]
[src]
pub struct GenericBounds<'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 GenericBounds list from a
Generics by using the to_bounds method. Note that this method
reflects an important semantic invariant of GenericBounds: while
the bounds in a Generics are expressed in terms of the bound type
parameters of the impl/trait/whatever, a GenericBounds 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 Generics for Foo would contain a list of bounds like
[[], [U:Bar<T>]]. Now if there were some particular reference
like Foo<int,uint>, then the GenericBounds would be [[],
[uint:Bar<int>]].
Fields
predicates |