Fix ICE in borrowck mutability suggestion with multi-byte ref sigil#155428
Open
lapla-cogito wants to merge 1 commit intorust-lang:mainfrom
Open
Fix ICE in borrowck mutability suggestion with multi-byte ref sigil#155428lapla-cogito wants to merge 1 commit intorust-lang:mainfrom
lapla-cogito wants to merge 1 commit intorust-lang:mainfrom
Conversation
Collaborator
|
r? @jackh726 rustbot has assigned @jackh726. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
f82751b to
4556034
Compare
Collaborator
|
This PR changes a file inside |
mejrs
reviewed
Apr 17, 2026
4556034 to
5023f65
Compare
This comment has been minimized.
This comment has been minimized.
5023f65 to
d0fdffc
Compare
lapla-cogito
commented
Apr 17, 2026
Comment on lines
-77
to
-78
| LL | unsafe fn named_ptr(x: *mut const (i32,)) { | ||
| | +++ |
Contributor
Author
There was a problem hiding this comment.
This suggestion was incorrect.
Contributor
Author
|
@rustbot ready |
Contributor
|
Thanks, just one more thing - can you add a code comment explaining why this exists? Something along the lines of "we may be dealing with parser recovery here and cannot assume the user actually typed r=me with comment |
d0fdffc to
a779e05
Compare
Contributor
Author
|
@rustbot ready |
mejrs
approved these changes
Apr 18, 2026
Contributor
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 #139089
Similarly to #155068, this is another instance where span arithmetic did not account for multi-byte characters. (Note that the ampersand in the test is full-width)
This change also results in correcting some inappropriate suggestions.