Module rustc::traits::fulfill[][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 infer::RegionObligation;
use infer::InferCtxt;
use mir::interpret::GlobalId;
use ty;
use ty::Ty;
use ty::TypeFoldable;
use ty::ToPolyTraitRef;
use ty::ToPredicate;
use ty::error::ExpectedFound;
use rustc_data_structures::obligation_forest::Error;
use rustc_data_structures::obligation_forest::ForestObligation;
use rustc_data_structures::obligation_forest::ObligationForest;
use rustc_data_structures::obligation_forest::ObligationProcessor;
use rustc_data_structures::obligation_forest::ProcessResult;
use std::marker::PhantomData;
use hir::def_id::DefId;
use middle::const_val::ConstEvalErr;
use middle::const_val::ErrKind;
use super::CodeAmbiguity;
use super::CodeProjectionError;
use super::CodeSelectionError;
use super::engine::TraitEngine;
use super::FulfillmentError;
use super::FulfillmentErrorCode;
use super::ObligationCause;
use super::PredicateObligation;
use super::Obligation;
use super::project;
use super::select::SelectionContext;
use super::Unimplemented;
use super::ConstEvalFailure;

Structs

FulfillProcessor [
Experimental
]
FulfillmentContext [
Experimental
]

The fulfillment context is used to drive trait resolution. It consists of a list of obligations that must be (eventually) satisfied. The job is to track which are satisfied, which yielded errors, and which are still pending. At any point, users can call select_where_possible, and the fulfillment context will try to do selection, retaining only those obligations that remain ambiguous. This may be helpful in pushing type inference along. Once all type inference constraints have been generated, the method select_all_or_error can be used to report any remaining ambiguous cases as errors.

PendingPredicateObligation [
Experimental
]

Functions

mk_pending [
Experimental
]
to_fulfillment_error [
Experimental
]
trait_ref_type_vars [
Experimental
]

Return the set of type variables contained in a trait ref