-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Tweaks to writeback and Obligation -> Goal
conversion
#138846
Conversation
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to super fold b/c it should be fully resolved :)
Obligation -> Goal
conversion
self.typeck_results.offset_of_data_mut().insert(hir_id, (container, indices.clone())); | ||
} | ||
} | ||
|
||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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_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.