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

Methods

impl<'tcx> GenericBounds<'tcx>

fn empty() -> GenericBounds<'tcx>

fn has_escaping_regions(&self) -> bool

fn is_empty(&self) -> bool

Trait Implementations

impl<'tcx> HasProjectionTypes for GenericBounds<'tcx>

fn has_projection_types(&self) -> bool

impl<'tcx> TypeFoldable<'tcx> for GenericBounds<'tcx>

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

impl<'tcx> Repr<'tcx> for GenericBounds<'tcx>

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

Derived Implementations

impl<'tcx> Show for GenericBounds<'tcx>

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

impl<'tcx> Clone for GenericBounds<'tcx>

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

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