Tweaks to writeback and Obligation -> Goal conversion#138846
Tweaks to writeback and Obligation -> Goal conversion#138846bors merged 3 commits intorust-lang:masterfrom
Obligation -> Goal conversion#138846Conversation
|
r? lcnr |
|
r? @Nadrieril rustbot has assigned @Nadrieril. Use |
|
Some changes occurred to the core trait solver cc @rust-lang/initiative-trait-system-refactor changes to |
| self.handle_term(ct, ty::Const::outer_exclusive_binder, |tcx, guar| { | ||
| ty::Const::new_error(tcx, guar) | ||
| }) | ||
| .super_fold_with(self) |
There was a problem hiding this comment.
No need to super fold b/c it should be fully resolved :)
Obligation -> Goal conversion
| } | ||
|
|
||
| fn resolve<T>(&mut self, value: T, span: &dyn Locatable) -> T | ||
| fn resolve<T>(&mut self, value: T, span: &dyn Locatable, should_normalize: bool) -> T |
There was a problem hiding this comment.
having a bool argument for this seems confusing.
Please either change this to a custom enum or split this into (normalize_and_)resolve and resolve_delayed_obligations
There was a problem hiding this comment.
i think normalize_and_resolve + resolve_delayed_coroutine_obligations is fine. a bit of code duplication, but I also dislike all the , true additions.
e7d27ba to
fad34c6
Compare
|
@bors r+ rollup |
Rollup of 10 pull requests Successful merges: - rust-lang#137593 (fix download-llvm logic for subtree sync branches) - rust-lang#137736 (Don't attempt to export compiler-builtins symbols from rust dylibs) - rust-lang#138135 (Simplify `PartialOrd` on tuples containing primitives) - rust-lang#138321 ([bootstrap] Distribute split debuginfo if present) - rust-lang#138574 (rustdoc: be more strict about "Methods from Deref") - rust-lang#138606 (Fix missing rustfmt in msi installer - cont) - rust-lang#138671 (Fix `FileType` `PartialEq` implementation on Windows) - rust-lang#138728 (Update `compiler-builtins` to 0.1.152) - rust-lang#138783 (Cache current_dll_path output) - rust-lang#138846 (Tweaks to writeback and `Obligation -> Goal` conversion) Failed merges: - rust-lang#138755 ([rustdoc] Remove duplicated loop when computing doc cfgs) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#138846 - compiler-errors:stall-prereqs, r=lcnr Tweaks to writeback and `Obligation -> Goal` conversion Each of these commits are self-contained, but are prerequisites that I'd like to land before rust-lang#138845, which still needs some cleaning. The ""most controversial"" one is probably [Explicitly don't fold coroutine obligations in writeback](rust-lang@e7d27ba), which I prefer because I think using `fold_predicate` to control against not normalizing predicates seems... easy to mess up 🤔, and we could have *other things* that we don't want to normalize. Explicitly noting whether we want `resolve` to normalize is a lot clearer (and currently in writeback is limited to resolving stalled coroutine obligations), since we can attach it to a comment that explains *why*.
Each of these commits are self-contained, but are prerequisites that I'd like to land before #138845, which still needs some cleaning.
The ""most controversial"" one is probably Explicitly don't fold coroutine obligations in writeback, which I prefer because I think using
fold_predicateto control against not normalizing predicates seems... easy to mess up 🤔, and we could have other things that we don't want to normalize.Explicitly noting whether we want
resolveto normalize is a lot clearer (and currently in writeback is limited to resolving stalled coroutine obligations), since we can attach it to a comment that explains why.