Module rustc::traits::util[][src]

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Re-exports

use hir::def_id::DefId;
use ty::subst::Kind;
use ty::subst::Subst;
use ty::subst::Substs;
use ty;
use ty::Ty;
use ty::TyCtxt;
use ty::ToPredicate;
use ty::ToPolyTraitRef;
use ty::outlives::Component;
use util::nodemap::FxHashSet;
use util::nodemap::FxHashSet;
use hir;
use traits::specialize::specialization_graph::NodeItem;
use super::Obligation;
use super::ObligationCause;
use super::PredicateObligation;
use super::SelectionContext;
use super::Normalized;

Structs

Elaborator [
Experimental
]

"Elaboration" is the process of identifying all the predicates that are implied by a source predicate. Currently this basically means walking the "supertraits" and other similar assumptions. For example, if we know that T : Ord, the elaborator would deduce that T : PartialOrd holds as well. Similarly, if we have trait Foo : 'static, and we know that T : Foo, then we know that T : 'static.

FilterToTraits [
Experimental
]

A filter around an iterator of predicates that makes it yield up just trait references.

PredicateSet [
Experimental
]
SupertraitDefIds [
Experimental
]

Enums

TupleArgumentsFlag [
Experimental
]

Functions

anonymize_predicate [
Experimental
]
elaborate_predicates [
Experimental
]
elaborate_trait_ref [
Experimental
]
elaborate_trait_refs [
Experimental
]
impl_trait_ref_and_oblig [
Experimental
]

Instantiate all bound parameters of the impl with the given substs, returning the resulting trait ref and all obligations that arise. The obligations are closed under normalization.

predicate_for_trait_ref [
Experimental
]
predicates_for_generics [
Experimental
]

See super::obligations_for_generics

supertrait_def_ids [
Experimental
]
supertraits [
Experimental
]
transitive_bounds [
Experimental
]

Type Definitions

Supertraits [
Experimental
]