Struct rustc::ty::InstantiatedPredicates
[−]
[src]
pub struct InstantiatedPredicates<'tcx> {
pub predicates: Vec<Predicate<'tcx>>,
}rustc_private)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: Vec<Predicate<'tcx>>
rustc_private)Methods
impl<'tcx> InstantiatedPredicates<'tcx>[src]
fn empty() -> InstantiatedPredicates<'tcx>
rustc_private)fn is_empty(&self) -> bool
rustc_private)Trait Implementations
impl<'tcx> TypeFoldable<'tcx> for InstantiatedPredicates<'tcx>[src]
fn super_fold_with<'gcx: 'tcx, F: TypeFolder<'gcx, 'tcx>>(&self,
folder: &mut F)
-> Self
folder: &mut F)
-> Self
rustc_private)fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> bool
rustc_private)fn fold_with<'gcx: 'tcx, F: TypeFolder<'gcx, 'tcx>>(&self,
folder: &mut F)
-> Self
folder: &mut F)
-> Self
rustc_private)fn visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> bool
rustc_private)fn has_regions_escaping_depth(&self, depth: u32) -> bool
rustc_private)fn has_escaping_regions(&self) -> bool
rustc_private)fn has_type_flags(&self, flags: TypeFlags) -> bool
rustc_private)fn has_projection_types(&self) -> bool
rustc_private)fn references_error(&self) -> bool
rustc_private)fn has_param_types(&self) -> bool
rustc_private)fn has_self_ty(&self) -> bool
rustc_private)fn has_infer_types(&self) -> bool
rustc_private)fn needs_infer(&self) -> bool
rustc_private)fn needs_subst(&self) -> bool
rustc_private)fn has_re_skol(&self) -> bool
rustc_private)fn has_closure_types(&self) -> bool
rustc_private)fn has_erasable_regions(&self) -> bool
rustc_private)fn is_normalized_for_trans(&self) -> bool
rustc_private)fn is_global(&self) -> bool
rustc_private)Indicates whether this value references only 'global' types/lifetimes that are the same regardless of what fn we are in. This is used for caching. Errs on the side of returning false. Read more
impl<'tcx> Clone for InstantiatedPredicates<'tcx>[src]
fn clone(&self) -> InstantiatedPredicates<'tcx>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more