-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Flush errors before deep normalize in dropck_outlives
#140947
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
Conversation
rustbot has assigned @petrochenkov. Use |
r? lcnr |
@bors r+ rollup |
@bors r- |
if !errors.is_empty() { | ||
return Err(errors); | ||
} | ||
|
||
ocx.deeply_normalize(&cause, param_env, ty)?; | ||
|
||
let errors = ocx.select_where_possible(); |
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.
are these errors always empty now?
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.
yeah
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.
reworked this code a bit b/c it was kinda goofy, returning Err(vec![])
in case deep normalization succeeded.
e2b4654
to
8bf387d
Compare
let errors = ocx.select_where_possible(); | ||
debug!("normalize errors: {ty} ~> {errors:#?}"); | ||
return Err(errors); | ||
match ocx.deeply_normalize(&cause, param_env, ty) { |
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.
pls add comment that we do this match to get FulfillmentError
s to report in case query_normalize
failed to avoid ICE due to a delayed bug
8bf387d
to
a508011
Compare
@bors r+ rollup |
Flush errors before deep normalize in `dropck_outlives` Deep normalization doesn't allow the ocx to have pending obligations, so process them before deeply normalizing. Fixes rust-lang#140931 Fixes rust-lang#140462
Flush errors before deep normalize in `dropck_outlives` Deep normalization doesn't allow the ocx to have pending obligations, so process them before deeply normalizing. Fixes rust-lang#140931 Fixes rust-lang#140462
…mpiler-errors Rollup of 14 pull requests Successful merges: - rust-lang#139749 (docs(library/core/src/pin): fix typo "necessarily" -> "necessary") - rust-lang#140130 (Add LLDB providers for BTreeMap and BTreeSet) - rust-lang#140685 (Simplify `Vec::as_non_null` implementation and make it `const`) - rust-lang#140712 (normalization: avoid incompletely constraining GAT args) - rust-lang#140768 (Improve `dangerous_implicit_aurorefs` diagnostic output) - rust-lang#140834 (move (or remove) some impl Trait tests) - rust-lang#140910 (Remove `stable` attribute from wasi fs (read_exact|write_all)_at) - rust-lang#140947 (Flush errors before deep normalize in `dropck_outlives`) - rust-lang#140966 (Remove #![feature(let_chains)] from library and src/librustdoc) - rust-lang#140977 ([win] Use a dash instead of slash for linker to avoid breaking lld) - rust-lang#140990 (VxWorks: updates from recent libc versions) - rust-lang#141003 (Improve ternary operator recovery) - rust-lang#141013 (Implement methods to set STARTUPINFO flags for Command API on Windows) - rust-lang#141026 (rustc-dev-guide subtree update) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#139749 (docs(library/core/src/pin): fix typo "necessarily" -> "necessary") - rust-lang#140685 (Simplify `Vec::as_non_null` implementation and make it `const`) - rust-lang#140712 (normalization: avoid incompletely constraining GAT args) - rust-lang#140768 (Improve `dangerous_implicit_aurorefs` diagnostic output) - rust-lang#140947 (Flush errors before deep normalize in `dropck_outlives`) - rust-lang#140966 (Remove #![feature(let_chains)] from library and src/librustdoc) - rust-lang#140990 (VxWorks: updates from recent libc versions) - rust-lang#141027 (remove `RustfmtState` to reduce `initial_rustfmt` complexity) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#139749 (docs(library/core/src/pin): fix typo "necessarily" -> "necessary") - rust-lang#140685 (Simplify `Vec::as_non_null` implementation and make it `const`) - rust-lang#140712 (normalization: avoid incompletely constraining GAT args) - rust-lang#140768 (Improve `dangerous_implicit_aurorefs` diagnostic output) - rust-lang#140947 (Flush errors before deep normalize in `dropck_outlives`) - rust-lang#140990 (VxWorks: updates from recent libc versions) - rust-lang#141027 (remove `RustfmtState` to reduce `initial_rustfmt` complexity) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#140947 - compiler-errors:pending-norm, r=lcnr Flush errors before deep normalize in `dropck_outlives` Deep normalization doesn't allow the ocx to have pending obligations, so process them before deeply normalizing. Fixes rust-lang#140931 Fixes rust-lang#140462
Deep normalization doesn't allow the ocx to have pending obligations, so process them before deeply normalizing.
Fixes #140931
Fixes #140462