Struct rustc_middle::ty::InstantiatedPredicates[][src]

pub struct InstantiatedPredicates<'tcx> {
    pub predicates: Vec<Predicate<'tcx>>,
    pub spans: Vec<Span>,

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.


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>]].


predicates: Vec<Predicate<'tcx>>spans: Vec<Span>


impl<'tcx> InstantiatedPredicates<'tcx>[src]

pub fn empty() -> InstantiatedPredicates<'tcx>[src]

pub fn is_empty(&self) -> bool[src]

Trait Implementations

impl<'tcx> Clone for InstantiatedPredicates<'tcx>[src]

impl<'tcx> Debug for InstantiatedPredicates<'tcx>[src]

impl<'tcx> TypeFoldable<'tcx> for InstantiatedPredicates<'tcx>[src]

Auto Trait Implementations

impl<'tcx> !RefUnwindSafe for InstantiatedPredicates<'tcx>

impl<'tcx> !Send for InstantiatedPredicates<'tcx>

impl<'tcx> !Sync for InstantiatedPredicates<'tcx>

impl<'tcx> Unpin for InstantiatedPredicates<'tcx>

impl<'tcx> !UnwindSafe for InstantiatedPredicates<'tcx>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<'a, T> Captures<'a> for T where
    T: ?Sized

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> MaybeResult<T> for T[src]

type Error = !

impl<'tcx, T> Subst<'tcx> for T where
    T: TypeFoldable<'tcx>, 

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> WithConstness for T[src]