-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
diagnostics: fix ICE in closure signature mismatch #152339
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
|
r? @BoxyUwU rustbot has assigned @BoxyUwU. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
This fixes the ICE by renaming conflicting arguments in the diagnostic.
7a8c74a to
fb55b5d
Compare
|
The conflicting rust/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs Lines 5430 to 5436 in be4794c
|
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.
Thanks, the fix makes sense to me.
|
r? Urgau |
…rgau diagnostics: fix ICE in closure signature mismatch Fixes rust-lang#152331 Fixes an ICE where `AdjustSignatureBorrow` caused a panic because it attempted to set the `len` argument which was already defined by the parent diagnostic. Both variants used `len` as argument name, but can both be present in a diagnostic. They now use different names for the argument.
…rgau diagnostics: fix ICE in closure signature mismatch Fixes rust-lang#152331 Fixes an ICE where `AdjustSignatureBorrow` caused a panic because it attempted to set the `len` argument which was already defined by the parent diagnostic. Both variants used `len` as argument name, but can both be present in a diagnostic. They now use different names for the argument.
…uwer Rollup of 8 pull requests Successful merges: - #151455 (Fix `SourceFile::normalized_byte_pos`) - #152250 (Remove support for slugs in diagnostic messages) - #152322 (Replace some `feature(core_intrinsics)` with stable hints) - #151640 (Cleanup offload datatransfer) - #152212 (Port some attributes to the attr parser) - #152309 (Fix bound var resolution for trait aliases) - #152339 (diagnostics: fix ICE in closure signature mismatch) - #152341 (`cfg_select!`: allow optional comma after `{ /* ... */ }`)
…uwer Rollup of 9 pull requests Successful merges: - #151455 (Fix `SourceFile::normalized_byte_pos`) - #152250 (Remove support for slugs in diagnostic messages) - #152322 (Replace some `feature(core_intrinsics)` with stable hints) - #152328 (Fix a few diagnostics) - #151640 (Cleanup offload datatransfer) - #152212 (Port some attributes to the attr parser) - #152309 (Fix bound var resolution for trait aliases) - #152339 (diagnostics: fix ICE in closure signature mismatch) - #152341 (`cfg_select!`: allow optional comma after `{ /* ... */ }`)
Rollup merge of #152339 - JonatanLindh:fix-issue-152331, r=Urgau diagnostics: fix ICE in closure signature mismatch Fixes #152331 Fixes an ICE where `AdjustSignatureBorrow` caused a panic because it attempted to set the `len` argument which was already defined by the parent diagnostic. Both variants used `len` as argument name, but can both be present in a diagnostic. They now use different names for the argument.
|
The test added by this PR does not demonstrate the underlying diagnostic bug. |
Fixes #152331
Fixes an ICE where
AdjustSignatureBorrowcaused a panic because it attempted to set thelenargument which was already defined by the parent diagnostic.Both variants used
lenas argument name, but can both be present in a diagnostic. They now use different names for the argument.