-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use ObligationCtxt
in favor of TraitEngine
in many more places
#124588
Conversation
Some changes occurred in engine.rs, potentially modifying the public API of |
@@ -182,6 +195,11 @@ impl<'a, 'tcx> ObligationCtxt<'a, 'tcx> { | |||
self.engine.borrow_mut().select_all_or_error(self.infcx) | |||
} | |||
|
|||
#[must_use] | |||
pub fn pending_obligations(&self) -> Vec<PredicateObligation<'tcx>> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could also consume the ocx
, since registering more goals (or doing anything else) will be ignored.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
didn't yet replace the uses of FulfillmentCtxt
, did you?
can do that in separate PRs, r=me after nits
let mut fulfill_cx = crate::solve::FulfillmentCtxt::new(self); | ||
fulfill_cx.register_predicate_obligation(self, obligation.clone()); | ||
// True errors | ||
// FIXME(-Znext-solver): Overflows are reported as ambig here, is that OK? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
either handle this FIXME or keep it :<
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is fine to remove. We don't have EvaluatedToErrStackDependent
anymore, and EvaluatedToAmbigStackDependent
only matters for the purposes of caching in the solver.
Some changes occurred to the core trait solver cc @rust-lang/initiative-trait-system-refactor |
Only usage of |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me, wait for me to make a small changes to coherence
shallow resolve in orphan check r? `@compiler-errors` cc rust-lang#124588 (review)
shallow resolve in orphan check r? ``@compiler-errors`` cc rust-lang#124588 (review)
Rollup merge of rust-lang#124623 - lcnr:coherence-uwu, r=compiler-errors shallow resolve in orphan check r? ``@compiler-errors`` cc rust-lang#124588 (review)
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#124461 (handle the targets that are missing in stage0) - rust-lang#124492 (Generalize `adjust_from_tcx` for `Allocation`) - rust-lang#124588 (Use `ObligationCtxt` in favor of `TraitEngine` in many more places) - rust-lang#124612 (Add support for inputing via stdin with run-make-support) - rust-lang#124613 (Allow fmt to run on rmake.rs test files) - rust-lang#124649 (Fix HorizonOS build broken by rust-lang#124210) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#124588 - compiler-errors:ocx, r=lcnr Use `ObligationCtxt` in favor of `TraitEngine` in many more places r? lcnr
r? lcnr