Struct rustc::traits::SelectionContext
[−]
[src]
pub struct SelectionContext<'cx, 'gcx: 'cx + 'tcx, 'tcx: 'cx> { /* fields omitted */ }
🔬 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?
Methods
impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx>
[src]
pub fn new(
infcx: &'cx InferCtxt<'cx, 'gcx, 'tcx>
) -> SelectionContext<'cx, 'gcx, 'tcx>
[src]
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]
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 infcx(&self) -> &'cx InferCtxt<'cx, 'gcx, 'tcx>
[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?
pub fn tcx(&self) -> TyCtxt<'cx, 'gcx, 'tcx>
[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?
pub fn closure_typer(&self) -> &'cx InferCtxt<'cx, 'gcx, 'tcx>
[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?
pub fn intercrate_ambiguity_causes(&self) -> &[IntercrateAmbiguityCause]
[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?
pub fn select(
&mut self,
obligation: &TraitObligation<'tcx>
) -> SelectionResult<'tcx, Selection<'tcx>>
[src]
&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 evaluate_obligation(
&mut self,
obligation: &PredicateObligation<'tcx>
) -> bool
[src]
&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_conservatively(
&mut self,
obligation: &PredicateObligation<'tcx>
) -> bool
[src]
&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,
and returns false
if not certain. However, this is not entirely
accurate if inference variables are involved.
pub fn coinductive_match<I>(&mut self, cycle: I) -> bool where
I: Iterator<Item = Predicate<'tcx>>,
[src]
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..
between X
an the top are
also defaulted traits.