diagnostics: fix ICE in closure signature mismatch#152339
Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom Feb 8, 2026
Merged
diagnostics: fix ICE in closure signature mismatch#152339rust-bors[bot] merged 1 commit intorust-lang:mainfrom
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
Conversation
Collaborator
|
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
Member
|
The conflicting rust/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs Lines 5430 to 5436 in be4794c |
Urgau
approved these changes
Feb 8, 2026
Member
|
r? Urgau |
Contributor
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Feb 8, 2026
…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.
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Feb 8, 2026
…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.
rust-bors bot
pushed a commit
that referenced
this pull request
Feb 8, 2026
…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 `{ /* ... */ }`)
rust-bors bot
pushed a commit
that referenced
this pull request
Feb 8, 2026
…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 `{ /* ... */ }`)
rust-timer
added a commit
that referenced
this pull request
Feb 8, 2026
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.