Module rustc::traits::project [−][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?
Code for projecting associated types out of trait references.
Re-exports
use super::elaborate_predicates; |
use super::specialization_graph; |
use super::translate_substs; |
use super::Obligation; |
use super::ObligationCause; |
use super::PredicateObligation; |
use super::Selection; |
use super::SelectionContext; |
use super::SelectionError; |
use super::VtableClosureData; |
use super::VtableGeneratorData; |
use super::VtableFnPointerData; |
use super::VtableImplData; |
use super::util; |
use hir::def_id::DefId; |
use infer::InferCtxt; |
use infer::InferOk; |
use infer::type_variable::TypeVariableOrigin; |
use middle::const_val::ConstVal; |
use mir::interpret::GlobalId; |
use rustc_data_structures::snapshot_map::Snapshot; |
use rustc_data_structures::snapshot_map::SnapshotMap; |
use syntax::symbol::Symbol; |
use ty::subst::Subst; |
use ty::subst::Substs; |
use ty; |
use ty::ToPredicate; |
use ty::ToPolyTraitRef; |
use ty::Ty; |
use ty::TyCtxt; |
use ty::fold::TypeFoldable; |
use ty::fold::TypeFolder; |
use util::common::FN_OUTPUT_NAME; |
Structs
AssociatedTypeNormalizer |
[ Experimental ]
|
MismatchedProjectionTypes |
[ Experimental ]
|
Normalized |
[ Experimental ]
|
Progress |
[ Experimental ]
|
ProjectionCache |
[ Experimental ] The projection cache. Unlike the standard caches, this can include infcx-dependent type variables - therefore, we have to roll the cache back each time we roll a snapshot back, to avoid assumptions on yet-unresolved inference variables. Types with skolemized regions also have to be removed when the respective snapshot ends. |
ProjectionCacheKey |
[ Experimental ]
|
ProjectionCacheSnapshot |
[ Experimental ]
|
Enums
ProjectedTy |
[ Experimental ]
|
ProjectionCacheEntry |
[ Experimental ]
|
ProjectionTyCandidate |
[ Experimental ]
|
ProjectionTyCandidateSet |
[ Experimental ]
|
ProjectionTyError |
[ Experimental ] When attempting to resolve |
Reveal |
[ Experimental ] Depending on the stage of compilation, we want projection to be more or less conservative. |
Functions
assemble_candidates_from_impls |
[ Experimental ]
|
assemble_candidates_from_param_env |
[ Experimental ] The first thing we have to do is scan through the parameter environment to see whether there are any projection predicates there that can answer this question. |
assemble_candidates_from_predicates |
[ Experimental ]
|
assemble_candidates_from_trait_def |
[ Experimental ] In the case of a nested projection like <::FooT as Bar>::BarT, we may find
that the definition of |
assoc_ty_def |
[ Experimental ] Locate the definition of an associated type in the specialization hierarchy, starting from the given impl. |
confirm_callable_candidate |
[ Experimental ]
|
confirm_candidate |
[ Experimental ]
|
confirm_closure_candidate |
[ Experimental ]
|
confirm_fn_pointer_candidate |
[ Experimental ]
|
confirm_generator_candidate |
[ Experimental ]
|
confirm_impl_candidate |
[ Experimental ]
|
confirm_object_candidate |
[ Experimental ]
|
confirm_param_env_candidate |
[ Experimental ]
|
confirm_select_candidate |
[ Experimental ]
|
normalize |
[ Experimental ] Normalizes any associated type projections in |
normalize_projection_type |
[ Experimental ] The guts of |
normalize_to_error |
[ Experimental ] If we are projecting |
normalize_with_depth |
[ Experimental ] As |
opt_normalize_projection_type |
[ Experimental ] The guts of |
poly_project_and_unify_type |
[ Experimental ] Evaluates constraints of the form: |
project_and_unify_type |
[ Experimental ] Evaluates constraints of the form: |
project_type |
[ Experimental ] Compute the result of a projection type (if we can). |
prune_cache_value_obligations |
[ Experimental ] If there are unresolved type variables, then we need to include any subobligations that bind them, at least until those type variables are fully resolved. |
push_paranoid_cache_value_obligation |
[ Experimental ] Whenever we give back a cache result for a projection like |
Type Definitions
NormalizedTy |
[ Experimental ]
|
PolyProjectionObligation |
[ Experimental ]
|
ProjectionObligation |
[ Experimental ]
|
ProjectionTyObligation |
[ Experimental ]
|