Struct rustc::traits::SelectionContext [−][src]
pub struct SelectionContext<'cx, 'gcx: 'cx + 'tcx, 'tcx: 'cx> { infcx: &'cx InferCtxt<'cx, 'gcx, 'tcx>, freshener: TypeFreshener<'cx, 'gcx, 'tcx>, intercrate: Option<IntercrateMode>, intercrate_ambiguity_causes: Option<Vec<IntercrateAmbiguityCause>>, allow_negative_impls: bool, query_mode: TraitQueryMode, }
🔬 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?
Fields
infcx: &'cx InferCtxt<'cx, 'gcx, 'tcx>
🔬 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?
freshener: TypeFreshener<'cx, 'gcx, 'tcx>
🔬 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?
Freshener used specifically for skolemizing entries on the obligation stack. This ensures that all entries on the stack at one time will have the same set of skolemized entries, which is important for checking for trait bounds that recursively require themselves.
intercrate: Option<IntercrateMode>
🔬 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?
If true, indicates that the evaluation should be conservative
and consider the possibility of types outside this crate.
This comes up primarily when resolving ambiguity. Imagine
there is some trait reference $0 : Bar
where $0
is an
inference variable. If intercrate
is true, then we can never
say for sure that this reference is not implemented, even if
there are no impls at all for Bar
, because $0
could be
bound to some type that in a downstream crate that implements
Bar
. This is the suitable mode for coherence. Elsewhere,
though, we set this to false, because we are only interested
in types that the user could actually have written --- in
other words, we consider $0 : Bar
to be unimplemented if
there is no type that the user could actually name that
would satisfy it. This avoids crippling inference, basically.
intercrate_ambiguity_causes: Option<Vec<IntercrateAmbiguityCause>>
🔬 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?
allow_negative_impls: bool
🔬 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?
Controls whether or not to filter out negative impls when selecting. This is used in librustdoc to distinguish between the lack of an impl and a negative impl
query_mode: TraitQueryMode
🔬 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?
The mode that trait queries run in, which informs our error handling policy. In essence, canonicalized queries need their errors propagated rather than immediately reported because we do not have accurate spans.
Methods
impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx>
[src]
impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx>
pub fn new(
infcx: &'cx InferCtxt<'cx, 'gcx, 'tcx>
) -> SelectionContext<'cx, 'gcx, 'tcx>
[src]
pub fn new(
infcx: &'cx InferCtxt<'cx, 'gcx, 'tcx>
) -> SelectionContext<'cx, 'gcx, 'tcx>
🔬 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?
pub fn intercrate(
infcx: &'cx InferCtxt<'cx, 'gcx, 'tcx>,
mode: IntercrateMode
) -> SelectionContext<'cx, 'gcx, 'tcx>
[src]
pub fn intercrate(
infcx: &'cx InferCtxt<'cx, 'gcx, 'tcx>,
mode: IntercrateMode
) -> SelectionContext<'cx, 'gcx, 'tcx>
🔬 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?
pub fn with_negative(
infcx: &'cx InferCtxt<'cx, 'gcx, 'tcx>,
allow_negative_impls: bool
) -> SelectionContext<'cx, 'gcx, 'tcx>
[src]
pub fn with_negative(
infcx: &'cx InferCtxt<'cx, 'gcx, 'tcx>,
allow_negative_impls: bool
) -> SelectionContext<'cx, 'gcx, 'tcx>
🔬 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?
pub fn with_query_mode(
infcx: &'cx InferCtxt<'cx, 'gcx, 'tcx>,
query_mode: TraitQueryMode
) -> SelectionContext<'cx, 'gcx, 'tcx>
[src]
pub fn with_query_mode(
infcx: &'cx InferCtxt<'cx, 'gcx, 'tcx>,
query_mode: TraitQueryMode
) -> SelectionContext<'cx, 'gcx, 'tcx>
🔬 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?
pub fn enable_tracking_intercrate_ambiguity_causes(&mut self)
[src]
pub fn enable_tracking_intercrate_ambiguity_causes(&mut self)
🔬 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?
Enables tracking of intercrate ambiguity causes. These are used in coherence to give improved diagnostics. We don't do this until we detect a coherence error because it can lead to false overflow results (#47139) and because it costs computation time.
pub fn take_intercrate_ambiguity_causes(
&mut self
) -> Vec<IntercrateAmbiguityCause>
[src]
pub fn take_intercrate_ambiguity_causes(
&mut self
) -> Vec<IntercrateAmbiguityCause>
🔬 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?
Gets the intercrate ambiguity causes collected since tracking was enabled and disables tracking at the same time. If tracking is not enabled, just returns an empty vector.
pub fn infcx(&self) -> &'cx InferCtxt<'cx, 'gcx, 'tcx>
[src]
pub fn infcx(&self) -> &'cx InferCtxt<'cx, 'gcx, 'tcx>
🔬 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?
pub fn tcx(&self) -> TyCtxt<'cx, 'gcx, 'tcx>
[src]
pub fn tcx(&self) -> TyCtxt<'cx, 'gcx, 'tcx>
🔬 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?
pub fn closure_typer(&self) -> &'cx InferCtxt<'cx, 'gcx, 'tcx>
[src]
pub fn closure_typer(&self) -> &'cx InferCtxt<'cx, 'gcx, 'tcx>
🔬 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?
fn in_snapshot<R, F>(&mut self, f: F) -> R where
F: FnOnce(&mut Self, &CombinedSnapshot<'cx, 'tcx>) -> R,
[src]
fn in_snapshot<R, F>(&mut self, f: F) -> R where
F: FnOnce(&mut Self, &CombinedSnapshot<'cx, 'tcx>) -> R,
🔬 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?
Wraps the inference context's in_snapshot s.t. snapshot handling is only from the selection context's self.
fn probe<R, F>(&mut self, f: F) -> R where
F: FnOnce(&mut Self, &CombinedSnapshot<'cx, 'tcx>) -> R,
[src]
fn probe<R, F>(&mut self, f: F) -> R where
F: FnOnce(&mut Self, &CombinedSnapshot<'cx, 'tcx>) -> R,
🔬 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?
Wraps a probe s.t. obligations collected during it are ignored and old obligations are retained.
fn commit_if_ok<T, E, F>(&mut self, f: F) -> Result<T, E> where
F: FnOnce(&mut Self, &CombinedSnapshot) -> Result<T, E>,
[src]
fn commit_if_ok<T, E, F>(&mut self, f: F) -> Result<T, E> where
F: FnOnce(&mut Self, &CombinedSnapshot) -> Result<T, E>,
🔬 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?
Wraps a commit_if_ok s.t. obligations collected during it are not returned in selection if the transaction fails and s.t. old obligations are retained.
pub fn select(
&mut self,
obligation: &TraitObligation<'tcx>
) -> SelectionResult<'tcx, Selection<'tcx>>
[src]
pub fn select(
&mut self,
obligation: &TraitObligation<'tcx>
) -> SelectionResult<'tcx, Selection<'tcx>>
🔬 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?
Attempts to satisfy the obligation. If successful, this will affect the surrounding type environment by performing unification.
pub fn predicate_may_hold_fatal(
&mut self,
obligation: &PredicateObligation<'tcx>
) -> bool
[src]
pub fn predicate_may_hold_fatal(
&mut self,
obligation: &PredicateObligation<'tcx>
) -> bool
🔬 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?
Evaluates whether the obligation obligation
can be satisfied (by any means).
pub fn evaluate_obligation_recursively(
&mut self,
obligation: &PredicateObligation<'tcx>
) -> Result<EvaluationResult, OverflowError>
[src]
pub fn evaluate_obligation_recursively(
&mut self,
obligation: &PredicateObligation<'tcx>
) -> Result<EvaluationResult, OverflowError>
🔬 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?
Evaluates whether the obligation obligation
can be satisfied and returns
an EvaluationResult
.
fn evaluate_predicates_recursively<'a, 'o, I>(
&mut self,
stack: TraitObligationStackList<'o, 'tcx>,
predicates: I
) -> Result<EvaluationResult, OverflowError> where
I: IntoIterator<Item = &'a PredicateObligation<'tcx>>,
'tcx: 'a,
[src]
fn evaluate_predicates_recursively<'a, 'o, I>(
&mut self,
stack: TraitObligationStackList<'o, 'tcx>,
predicates: I
) -> Result<EvaluationResult, OverflowError> where
I: IntoIterator<Item = &'a PredicateObligation<'tcx>>,
'tcx: 'a,
🔬 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?
Evaluates the predicates in predicates
recursively. Note that
this applies projections in the predicates, and therefore
is run within an inference probe.
fn evaluate_predicate_recursively<'o>(
&mut self,
previous_stack: TraitObligationStackList<'o, 'tcx>,
obligation: &PredicateObligation<'tcx>
) -> Result<EvaluationResult, OverflowError>
[src]
fn evaluate_predicate_recursively<'o>(
&mut self,
previous_stack: TraitObligationStackList<'o, 'tcx>,
obligation: &PredicateObligation<'tcx>
) -> Result<EvaluationResult, OverflowError>
🔬 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?
fn evaluate_trait_predicate_recursively<'o>(
&mut self,
previous_stack: TraitObligationStackList<'o, 'tcx>,
obligation: TraitObligation<'tcx>
) -> Result<EvaluationResult, OverflowError>
[src]
fn evaluate_trait_predicate_recursively<'o>(
&mut self,
previous_stack: TraitObligationStackList<'o, 'tcx>,
obligation: TraitObligation<'tcx>
) -> Result<EvaluationResult, OverflowError>
🔬 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?
fn evaluate_stack<'o>(
&mut self,
stack: &TraitObligationStack<'o, 'tcx>
) -> Result<EvaluationResult, OverflowError>
[src]
fn evaluate_stack<'o>(
&mut self,
stack: &TraitObligationStack<'o, 'tcx>
) -> Result<EvaluationResult, OverflowError>
🔬 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?
pub fn coinductive_match<I>(&mut self, cycle: I) -> bool where
I: Iterator<Item = Predicate<'tcx>>,
[src]
pub fn coinductive_match<I>(&mut self, cycle: I) -> bool where
I: Iterator<Item = Predicate<'tcx>>,
🔬 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?
For defaulted traits, we use a co-inductive strategy to solve, so
that recursion is ok. This routine returns true if the top of the
stack (cycle[0]
):
- is a defaulted trait, and
- it also appears in the backtrace at some position
X
; and, - all the predicates at positions
X..
betweenX
an the top are also defaulted traits.
fn coinductive_predicate(&self, predicate: Predicate<'tcx>) -> bool
[src]
fn coinductive_predicate(&self, predicate: Predicate<'tcx>) -> bool
🔬 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?
fn evaluate_candidate<'o>(
&mut self,
stack: &TraitObligationStack<'o, 'tcx>,
candidate: &SelectionCandidate<'tcx>
) -> Result<EvaluationResult, OverflowError>
[src]
fn evaluate_candidate<'o>(
&mut self,
stack: &TraitObligationStack<'o, 'tcx>,
candidate: &SelectionCandidate<'tcx>
) -> Result<EvaluationResult, OverflowError>
🔬 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?
Further evaluate candidate
to decide whether all type parameters match and whether nested
obligations are met. Returns true if candidate
remains viable after this further
scrutiny.
fn check_evaluation_cache(
&self,
param_env: ParamEnv<'tcx>,
trait_ref: PolyTraitRef<'tcx>
) -> Option<EvaluationResult>
[src]
fn check_evaluation_cache(
&self,
param_env: ParamEnv<'tcx>,
trait_ref: PolyTraitRef<'tcx>
) -> Option<EvaluationResult>
🔬 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?
fn insert_evaluation_cache(
&mut self,
param_env: ParamEnv<'tcx>,
trait_ref: PolyTraitRef<'tcx>,
dep_node: DepNodeIndex,
result: EvaluationResult
)
[src]
fn insert_evaluation_cache(
&mut self,
param_env: ParamEnv<'tcx>,
trait_ref: PolyTraitRef<'tcx>,
dep_node: DepNodeIndex,
result: EvaluationResult
)
🔬 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?
fn candidate_from_obligation<'o>(
&mut self,
stack: &TraitObligationStack<'o, 'tcx>
) -> SelectionResult<'tcx, SelectionCandidate<'tcx>>
[src]
fn candidate_from_obligation<'o>(
&mut self,
stack: &TraitObligationStack<'o, 'tcx>
) -> SelectionResult<'tcx, SelectionCandidate<'tcx>>
🔬 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?
fn in_task<OP, R>(&mut self, op: OP) -> (R, DepNodeIndex) where
OP: FnOnce(&mut Self) -> R,
[src]
fn in_task<OP, R>(&mut self, op: OP) -> (R, DepNodeIndex) where
OP: FnOnce(&mut Self) -> R,
🔬 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?
fn filter_negative_impls(
&self,
candidate: SelectionCandidate<'tcx>
) -> SelectionResult<'tcx, SelectionCandidate<'tcx>>
[src]
fn filter_negative_impls(
&self,
candidate: SelectionCandidate<'tcx>
) -> SelectionResult<'tcx, SelectionCandidate<'tcx>>
🔬 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?
fn candidate_from_obligation_no_cache<'o>(
&mut self,
stack: &TraitObligationStack<'o, 'tcx>
) -> SelectionResult<'tcx, SelectionCandidate<'tcx>>
[src]
fn candidate_from_obligation_no_cache<'o>(
&mut self,
stack: &TraitObligationStack<'o, 'tcx>
) -> SelectionResult<'tcx, SelectionCandidate<'tcx>>
🔬 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?
fn is_knowable<'o>(
&mut self,
stack: &TraitObligationStack<'o, 'tcx>
) -> Option<Conflict>
[src]
fn is_knowable<'o>(
&mut self,
stack: &TraitObligationStack<'o, 'tcx>
) -> Option<Conflict>
🔬 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?
fn can_use_global_caches(&self, param_env: ParamEnv<'tcx>) -> bool
[src]
fn can_use_global_caches(&self, param_env: ParamEnv<'tcx>) -> bool
🔬 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?
Returns true if the global caches can be used. Do note that if the type itself is not in the global tcx, the local caches will be used.
fn check_candidate_cache(
&mut self,
param_env: ParamEnv<'tcx>,
cache_fresh_trait_pred: &PolyTraitPredicate<'tcx>
) -> Option<SelectionResult<'tcx, SelectionCandidate<'tcx>>>
[src]
fn check_candidate_cache(
&mut self,
param_env: ParamEnv<'tcx>,
cache_fresh_trait_pred: &PolyTraitPredicate<'tcx>
) -> Option<SelectionResult<'tcx, SelectionCandidate<'tcx>>>
🔬 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?
fn insert_candidate_cache(
&mut self,
param_env: ParamEnv<'tcx>,
cache_fresh_trait_pred: PolyTraitPredicate<'tcx>,
dep_node: DepNodeIndex,
candidate: SelectionResult<'tcx, SelectionCandidate<'tcx>>
)
[src]
fn insert_candidate_cache(
&mut self,
param_env: ParamEnv<'tcx>,
cache_fresh_trait_pred: PolyTraitPredicate<'tcx>,
dep_node: DepNodeIndex,
candidate: SelectionResult<'tcx, SelectionCandidate<'tcx>>
)
🔬 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?
fn assemble_candidates<'o>(
&mut self,
stack: &TraitObligationStack<'o, 'tcx>
) -> Result<SelectionCandidateSet<'tcx>, SelectionError<'tcx>>
[src]
fn assemble_candidates<'o>(
&mut self,
stack: &TraitObligationStack<'o, 'tcx>
) -> Result<SelectionCandidateSet<'tcx>, SelectionError<'tcx>>
🔬 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?
fn assemble_candidates_from_projected_tys(
&mut self,
obligation: &TraitObligation<'tcx>,
candidates: &mut SelectionCandidateSet<'tcx>
)
[src]
fn assemble_candidates_from_projected_tys(
&mut self,
obligation: &TraitObligation<'tcx>,
candidates: &mut SelectionCandidateSet<'tcx>
)
🔬 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?
fn match_projection_obligation_against_definition_bounds(
&mut self,
obligation: &TraitObligation<'tcx>,
snapshot: &CombinedSnapshot<'cx, 'tcx>
) -> bool
[src]
fn match_projection_obligation_against_definition_bounds(
&mut self,
obligation: &TraitObligation<'tcx>,
snapshot: &CombinedSnapshot<'cx, 'tcx>
) -> bool
🔬 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?
fn match_projection(
&mut self,
obligation: &TraitObligation<'tcx>,
trait_bound: PolyTraitRef<'tcx>,
skol_trait_ref: TraitRef<'tcx>,
skol_map: &SkolemizationMap<'tcx>,
snapshot: &CombinedSnapshot<'cx, 'tcx>
) -> bool
[src]
fn match_projection(
&mut self,
obligation: &TraitObligation<'tcx>,
trait_bound: PolyTraitRef<'tcx>,
skol_trait_ref: TraitRef<'tcx>,
skol_map: &SkolemizationMap<'tcx>,
snapshot: &CombinedSnapshot<'cx, 'tcx>
) -> bool
🔬 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?
fn assemble_candidates_from_caller_bounds<'o>(
&mut self,
stack: &TraitObligationStack<'o, 'tcx>,
candidates: &mut SelectionCandidateSet<'tcx>
) -> Result<(), SelectionError<'tcx>>
[src]
fn assemble_candidates_from_caller_bounds<'o>(
&mut self,
stack: &TraitObligationStack<'o, 'tcx>,
candidates: &mut SelectionCandidateSet<'tcx>
) -> Result<(), SelectionError<'tcx>>
🔬 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?
Given an obligation like <SomeTrait for T>
, search the obligations that the caller
supplied to find out whether it is listed among them.
Never affects inference environment.
fn evaluate_where_clause<'o>(
&mut self,
stack: &TraitObligationStack<'o, 'tcx>,
where_clause_trait_ref: PolyTraitRef<'tcx>
) -> Result<EvaluationResult, OverflowError>
[src]
fn evaluate_where_clause<'o>(
&mut self,
stack: &TraitObligationStack<'o, 'tcx>,
where_clause_trait_ref: PolyTraitRef<'tcx>
) -> Result<EvaluationResult, OverflowError>
🔬 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?
fn assemble_generator_candidates(
&mut self,
obligation: &TraitObligation<'tcx>,
candidates: &mut SelectionCandidateSet<'tcx>
) -> Result<(), SelectionError<'tcx>>
[src]
fn assemble_generator_candidates(
&mut self,
obligation: &TraitObligation<'tcx>,
candidates: &mut SelectionCandidateSet<'tcx>
) -> Result<(), SelectionError<'tcx>>
🔬 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?
fn assemble_closure_candidates(
&mut self,
obligation: &TraitObligation<'tcx>,
candidates: &mut SelectionCandidateSet<'tcx>
) -> Result<(), SelectionError<'tcx>>
[src]
fn assemble_closure_candidates(
&mut self,
obligation: &TraitObligation<'tcx>,
candidates: &mut SelectionCandidateSet<'tcx>
) -> Result<(), SelectionError<'tcx>>
🔬 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?
Check for the artificial impl that the compiler will create for an obligation like X : FnMut<..>
where X
is a closure type.
Note: the type parameters on a closure candidate are modeled as output type parameters and hence do not affect whether this trait is a match or not. They will be unified during the confirmation step.
fn assemble_fn_pointer_candidates(
&mut self,
obligation: &TraitObligation<'tcx>,
candidates: &mut SelectionCandidateSet<'tcx>
) -> Result<(), SelectionError<'tcx>>
[src]
fn assemble_fn_pointer_candidates(
&mut self,
obligation: &TraitObligation<'tcx>,
candidates: &mut SelectionCandidateSet<'tcx>
) -> Result<(), SelectionError<'tcx>>
🔬 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?
Implement one of the Fn()
family for a fn pointer.
fn assemble_candidates_from_impls(
&mut self,
obligation: &TraitObligation<'tcx>,
candidates: &mut SelectionCandidateSet<'tcx>
) -> Result<(), SelectionError<'tcx>>
[src]
fn assemble_candidates_from_impls(
&mut self,
obligation: &TraitObligation<'tcx>,
candidates: &mut SelectionCandidateSet<'tcx>
) -> Result<(), SelectionError<'tcx>>
🔬 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?
Search for impls that might apply to obligation
.
fn assemble_candidates_from_auto_impls(
&mut self,
obligation: &TraitObligation<'tcx>,
candidates: &mut SelectionCandidateSet<'tcx>
) -> Result<(), SelectionError<'tcx>>
[src]
fn assemble_candidates_from_auto_impls(
&mut self,
obligation: &TraitObligation<'tcx>,
candidates: &mut SelectionCandidateSet<'tcx>
) -> Result<(), SelectionError<'tcx>>
🔬 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?
fn assemble_candidates_from_object_ty(
&mut self,
obligation: &TraitObligation<'tcx>,
candidates: &mut SelectionCandidateSet<'tcx>
)
[src]
fn assemble_candidates_from_object_ty(
&mut self,
obligation: &TraitObligation<'tcx>,
candidates: &mut SelectionCandidateSet<'tcx>
)
🔬 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?
Search for impls that might apply to obligation
.
fn assemble_candidates_for_unsizing(
&mut self,
obligation: &TraitObligation<'tcx>,
candidates: &mut SelectionCandidateSet<'tcx>
)
[src]
fn assemble_candidates_for_unsizing(
&mut self,
obligation: &TraitObligation<'tcx>,
candidates: &mut SelectionCandidateSet<'tcx>
)
🔬 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?
Search for unsizing that might apply to obligation
.
fn candidate_should_be_dropped_in_favor_of<'o>(
&mut self,
victim: &EvaluatedCandidate<'tcx>,
other: &EvaluatedCandidate<'tcx>
) -> bool
[src]
fn candidate_should_be_dropped_in_favor_of<'o>(
&mut self,
victim: &EvaluatedCandidate<'tcx>,
other: &EvaluatedCandidate<'tcx>
) -> bool
🔬 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?
Returns true if victim
should be dropped in favor of
other
. Generally speaking we will drop duplicate
candidates and prefer where-clause candidates.
See the comment for "SelectionCandidate" for more details.
fn assemble_builtin_bound_candidates<'o>(
&mut self,
conditions: BuiltinImplConditions<'tcx>,
candidates: &mut SelectionCandidateSet<'tcx>
) -> Result<(), SelectionError<'tcx>>
[src]
fn assemble_builtin_bound_candidates<'o>(
&mut self,
conditions: BuiltinImplConditions<'tcx>,
candidates: &mut SelectionCandidateSet<'tcx>
) -> Result<(), SelectionError<'tcx>>
🔬 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?
fn sized_conditions(
&mut self,
obligation: &TraitObligation<'tcx>
) -> BuiltinImplConditions<'tcx>
[src]
fn sized_conditions(
&mut self,
obligation: &TraitObligation<'tcx>
) -> BuiltinImplConditions<'tcx>
🔬 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?
fn copy_clone_conditions(
&mut self,
obligation: &TraitObligation<'tcx>
) -> BuiltinImplConditions<'tcx>
[src]
fn copy_clone_conditions(
&mut self,
obligation: &TraitObligation<'tcx>
) -> BuiltinImplConditions<'tcx>
🔬 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?
fn constituent_types_for_ty(&self, t: Ty<'tcx>) -> Vec<Ty<'tcx>>
[src]
fn constituent_types_for_ty(&self, t: Ty<'tcx>) -> Vec<Ty<'tcx>>
🔬 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?
For default impls, we need to break apart a type into its "constituent types" -- meaning, the types that it contains.
Here are some (simple) examples:
(i32, u32) -> [i32, u32] Foo where struct Foo { x: i32, y: u32 } -> [i32, u32] Bar<i32> where struct Bar<T> { x: T, y: u32 } -> [i32, u32] Zed<i32> where enum Zed { A(T), B(u32) } -> [i32, u32]
fn collect_predicates_for_types(
&mut self,
param_env: ParamEnv<'tcx>,
cause: ObligationCause<'tcx>,
recursion_depth: usize,
trait_def_id: DefId,
types: Binder<Vec<Ty<'tcx>>>
) -> Vec<PredicateObligation<'tcx>>
[src]
fn collect_predicates_for_types(
&mut self,
param_env: ParamEnv<'tcx>,
cause: ObligationCause<'tcx>,
recursion_depth: usize,
trait_def_id: DefId,
types: Binder<Vec<Ty<'tcx>>>
) -> Vec<PredicateObligation<'tcx>>
🔬 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?
fn confirm_candidate(
&mut self,
obligation: &TraitObligation<'tcx>,
candidate: SelectionCandidate<'tcx>
) -> Result<Selection<'tcx>, SelectionError<'tcx>>
[src]
fn confirm_candidate(
&mut self,
obligation: &TraitObligation<'tcx>,
candidate: SelectionCandidate<'tcx>
) -> Result<Selection<'tcx>, SelectionError<'tcx>>
🔬 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?
fn confirm_projection_candidate(&mut self, obligation: &TraitObligation<'tcx>)
[src]
fn confirm_projection_candidate(&mut self, obligation: &TraitObligation<'tcx>)
🔬 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?
fn confirm_param_candidate(
&mut self,
obligation: &TraitObligation<'tcx>,
param: PolyTraitRef<'tcx>
) -> Vec<PredicateObligation<'tcx>>
[src]
fn confirm_param_candidate(
&mut self,
obligation: &TraitObligation<'tcx>,
param: PolyTraitRef<'tcx>
) -> Vec<PredicateObligation<'tcx>>
🔬 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?
fn confirm_builtin_candidate(
&mut self,
obligation: &TraitObligation<'tcx>,
has_nested: bool
) -> VtableBuiltinData<PredicateObligation<'tcx>>
[src]
fn confirm_builtin_candidate(
&mut self,
obligation: &TraitObligation<'tcx>,
has_nested: bool
) -> VtableBuiltinData<PredicateObligation<'tcx>>
🔬 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?
fn confirm_auto_impl_candidate(
&mut self,
obligation: &TraitObligation<'tcx>,
trait_def_id: DefId
) -> VtableAutoImplData<PredicateObligation<'tcx>>
[src]
fn confirm_auto_impl_candidate(
&mut self,
obligation: &TraitObligation<'tcx>,
trait_def_id: DefId
) -> VtableAutoImplData<PredicateObligation<'tcx>>
🔬 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?
This handles the case where a auto trait Foo
impl is being used.
The idea is that the impl applies to X : Foo
if the following conditions are met:
- For each constituent type
Y
inX
,Y : Foo
holds - For each where-clause
C
declared onFoo
,[Self => X] C
holds.
fn vtable_auto_impl(
&mut self,
obligation: &TraitObligation<'tcx>,
trait_def_id: DefId,
nested: Binder<Vec<Ty<'tcx>>>
) -> VtableAutoImplData<PredicateObligation<'tcx>>
[src]
fn vtable_auto_impl(
&mut self,
obligation: &TraitObligation<'tcx>,
trait_def_id: DefId,
nested: Binder<Vec<Ty<'tcx>>>
) -> VtableAutoImplData<PredicateObligation<'tcx>>
🔬 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?
See confirm_auto_impl_candidate
fn confirm_impl_candidate(
&mut self,
obligation: &TraitObligation<'tcx>,
impl_def_id: DefId
) -> VtableImplData<'tcx, PredicateObligation<'tcx>>
[src]
fn confirm_impl_candidate(
&mut self,
obligation: &TraitObligation<'tcx>,
impl_def_id: DefId
) -> VtableImplData<'tcx, PredicateObligation<'tcx>>
🔬 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?
fn vtable_impl(
&mut self,
impl_def_id: DefId,
substs: Normalized<'tcx, &'tcx Substs<'tcx>>,
cause: ObligationCause<'tcx>,
recursion_depth: usize,
param_env: ParamEnv<'tcx>,
skol_map: SkolemizationMap<'tcx>,
snapshot: &CombinedSnapshot<'cx, 'tcx>
) -> VtableImplData<'tcx, PredicateObligation<'tcx>>
[src]
fn vtable_impl(
&mut self,
impl_def_id: DefId,
substs: Normalized<'tcx, &'tcx Substs<'tcx>>,
cause: ObligationCause<'tcx>,
recursion_depth: usize,
param_env: ParamEnv<'tcx>,
skol_map: SkolemizationMap<'tcx>,
snapshot: &CombinedSnapshot<'cx, 'tcx>
) -> VtableImplData<'tcx, PredicateObligation<'tcx>>
🔬 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?
fn confirm_object_candidate(
&mut self,
obligation: &TraitObligation<'tcx>
) -> VtableObjectData<'tcx, PredicateObligation<'tcx>>
[src]
fn confirm_object_candidate(
&mut self,
obligation: &TraitObligation<'tcx>
) -> VtableObjectData<'tcx, PredicateObligation<'tcx>>
🔬 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?
fn confirm_fn_pointer_candidate(
&mut self,
obligation: &TraitObligation<'tcx>
) -> Result<VtableFnPointerData<'tcx, PredicateObligation<'tcx>>, SelectionError<'tcx>>
[src]
fn confirm_fn_pointer_candidate(
&mut self,
obligation: &TraitObligation<'tcx>
) -> Result<VtableFnPointerData<'tcx, PredicateObligation<'tcx>>, SelectionError<'tcx>>
🔬 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?
fn confirm_generator_candidate(
&mut self,
obligation: &TraitObligation<'tcx>
) -> Result<VtableGeneratorData<'tcx, PredicateObligation<'tcx>>, SelectionError<'tcx>>
[src]
fn confirm_generator_candidate(
&mut self,
obligation: &TraitObligation<'tcx>
) -> Result<VtableGeneratorData<'tcx, PredicateObligation<'tcx>>, SelectionError<'tcx>>
🔬 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?
fn confirm_closure_candidate(
&mut self,
obligation: &TraitObligation<'tcx>
) -> Result<VtableClosureData<'tcx, PredicateObligation<'tcx>>, SelectionError<'tcx>>
[src]
fn confirm_closure_candidate(
&mut self,
obligation: &TraitObligation<'tcx>
) -> Result<VtableClosureData<'tcx, PredicateObligation<'tcx>>, SelectionError<'tcx>>
🔬 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?
fn confirm_poly_trait_refs(
&mut self,
obligation_cause: ObligationCause<'tcx>,
obligation_param_env: ParamEnv<'tcx>,
obligation_trait_ref: PolyTraitRef<'tcx>,
expected_trait_ref: PolyTraitRef<'tcx>
) -> Result<Vec<PredicateObligation<'tcx>>, SelectionError<'tcx>>
[src]
fn confirm_poly_trait_refs(
&mut self,
obligation_cause: ObligationCause<'tcx>,
obligation_param_env: ParamEnv<'tcx>,
obligation_trait_ref: PolyTraitRef<'tcx>,
expected_trait_ref: PolyTraitRef<'tcx>
) -> Result<Vec<PredicateObligation<'tcx>>, SelectionError<'tcx>>
🔬 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?
In the case of closure types and fn pointers, we currently treat the input type parameters on the trait as outputs. This means that when we have a match we have only considered the self type, so we have to go back and make sure to relate the argument types too. This is kind of wrong, but since we control the full set of impls, also not that wrong, and it DOES yield better error messages (since we don't report errors as if there is no applicable impl, but rather report errors are about mismatched argument types.
Here is an example. Imagine we have a closure expression
and we desugared it so that the type of the expression is
Closure
, and Closure
expects an int as argument. Then it
is "as if" the compiler generated this impl:
impl Fn(int) for Closure { ... }
Now imagine our obligation is Fn(usize) for Closure
. So far
we have matched the self-type Closure
. At this point we'll
compare the int
to usize
and generate an error.
Note that this checking occurs after the impl has selected, because these output type parameters should not affect the selection of the impl. Therefore, if there is a mismatch, we report an error to the user.
fn confirm_builtin_unsize_candidate(
&mut self,
obligation: &TraitObligation<'tcx>
) -> Result<VtableBuiltinData<PredicateObligation<'tcx>>, SelectionError<'tcx>>
[src]
fn confirm_builtin_unsize_candidate(
&mut self,
obligation: &TraitObligation<'tcx>
) -> Result<VtableBuiltinData<PredicateObligation<'tcx>>, SelectionError<'tcx>>
🔬 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?
fn rematch_impl(
&mut self,
impl_def_id: DefId,
obligation: &TraitObligation<'tcx>,
snapshot: &CombinedSnapshot<'cx, 'tcx>
) -> (Normalized<'tcx, &'tcx Substs<'tcx>>, SkolemizationMap<'tcx>)
[src]
fn rematch_impl(
&mut self,
impl_def_id: DefId,
obligation: &TraitObligation<'tcx>,
snapshot: &CombinedSnapshot<'cx, 'tcx>
) -> (Normalized<'tcx, &'tcx Substs<'tcx>>, SkolemizationMap<'tcx>)
🔬 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?
fn match_impl(
&mut self,
impl_def_id: DefId,
obligation: &TraitObligation<'tcx>,
snapshot: &CombinedSnapshot<'cx, 'tcx>
) -> Result<(Normalized<'tcx, &'tcx Substs<'tcx>>, SkolemizationMap<'tcx>), ()>
[src]
fn match_impl(
&mut self,
impl_def_id: DefId,
obligation: &TraitObligation<'tcx>,
snapshot: &CombinedSnapshot<'cx, 'tcx>
) -> Result<(Normalized<'tcx, &'tcx Substs<'tcx>>, SkolemizationMap<'tcx>), ()>
🔬 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?
fn fast_reject_trait_refs(
&mut self,
obligation: &TraitObligation,
impl_trait_ref: &TraitRef
) -> bool
[src]
fn fast_reject_trait_refs(
&mut self,
obligation: &TraitObligation,
impl_trait_ref: &TraitRef
) -> bool
🔬 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?
fn match_where_clause_trait_ref(
&mut self,
obligation: &TraitObligation<'tcx>,
where_clause_trait_ref: PolyTraitRef<'tcx>
) -> Result<Vec<PredicateObligation<'tcx>>, ()>
[src]
fn match_where_clause_trait_ref(
&mut self,
obligation: &TraitObligation<'tcx>,
where_clause_trait_ref: PolyTraitRef<'tcx>
) -> Result<Vec<PredicateObligation<'tcx>>, ()>
🔬 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?
Normalize where_clause_trait_ref
and try to match it against
obligation
. If successful, return any predicates that
result from the normalization. Normalization is necessary
because where-clauses are stored in the parameter environment
unnormalized.
fn match_poly_trait_ref(
&mut self,
obligation: &TraitObligation<'tcx>,
poly_trait_ref: PolyTraitRef<'tcx>
) -> Result<Vec<PredicateObligation<'tcx>>, ()>
[src]
fn match_poly_trait_ref(
&mut self,
obligation: &TraitObligation<'tcx>,
poly_trait_ref: PolyTraitRef<'tcx>
) -> Result<Vec<PredicateObligation<'tcx>>, ()>
🔬 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?
Returns Ok
if poly_trait_ref
being true implies that the
obligation is satisfied.
fn match_fresh_trait_refs(
&self,
previous: &PolyTraitRef<'tcx>,
current: &PolyTraitRef<'tcx>
) -> bool
[src]
fn match_fresh_trait_refs(
&self,
previous: &PolyTraitRef<'tcx>,
current: &PolyTraitRef<'tcx>
) -> bool
🔬 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?
fn push_stack<'o, 's: 'o>(
&mut self,
previous_stack: TraitObligationStackList<'s, 'tcx>,
obligation: &'o TraitObligation<'tcx>
) -> TraitObligationStack<'o, 'tcx>
[src]
fn push_stack<'o, 's: 'o>(
&mut self,
previous_stack: TraitObligationStackList<'s, 'tcx>,
obligation: &'o TraitObligation<'tcx>
) -> TraitObligationStack<'o, 'tcx>
🔬 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?
fn closure_trait_ref_unnormalized(
&mut self,
obligation: &TraitObligation<'tcx>,
closure_def_id: DefId,
substs: ClosureSubsts<'tcx>
) -> PolyTraitRef<'tcx>
[src]
fn closure_trait_ref_unnormalized(
&mut self,
obligation: &TraitObligation<'tcx>,
closure_def_id: DefId,
substs: ClosureSubsts<'tcx>
) -> PolyTraitRef<'tcx>
🔬 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?
fn generator_trait_ref_unnormalized(
&mut self,
obligation: &TraitObligation<'tcx>,
closure_def_id: DefId,
substs: GeneratorSubsts<'tcx>
) -> PolyTraitRef<'tcx>
[src]
fn generator_trait_ref_unnormalized(
&mut self,
obligation: &TraitObligation<'tcx>,
closure_def_id: DefId,
substs: GeneratorSubsts<'tcx>
) -> PolyTraitRef<'tcx>
🔬 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?
fn impl_or_trait_obligations(
&mut self,
cause: ObligationCause<'tcx>,
recursion_depth: usize,
param_env: ParamEnv<'tcx>,
def_id: DefId,
substs: &Substs<'tcx>,
skol_map: SkolemizationMap<'tcx>,
snapshot: &CombinedSnapshot<'cx, 'tcx>
) -> Vec<PredicateObligation<'tcx>>
[src]
fn impl_or_trait_obligations(
&mut self,
cause: ObligationCause<'tcx>,
recursion_depth: usize,
param_env: ParamEnv<'tcx>,
def_id: DefId,
substs: &Substs<'tcx>,
skol_map: SkolemizationMap<'tcx>,
snapshot: &CombinedSnapshot<'cx, 'tcx>
) -> Vec<PredicateObligation<'tcx>>
🔬 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?
Returns the obligations that are implied by instantiating an impl or trait. The obligations are substituted and fully normalized. This is used when confirming an impl or default impl.
Auto Trait Implementations
impl<'cx, 'gcx, 'tcx> !Send for SelectionContext<'cx, 'gcx, 'tcx>
impl<'cx, 'gcx, 'tcx> !Send for SelectionContext<'cx, 'gcx, 'tcx>
impl<'cx, 'gcx, 'tcx> !Sync for SelectionContext<'cx, 'gcx, 'tcx>
impl<'cx, 'gcx, 'tcx> !Sync for SelectionContext<'cx, 'gcx, 'tcx>