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]
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 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?
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 evaluate_obligation(
&mut self,
obligation: &PredicateObligation<'tcx>
) -> bool
[src]
pub fn evaluate_obligation(
&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]
pub fn evaluate_obligation_conservatively(
&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]
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.
Trait Implementations
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>