Fix ICE in borrowck mutability suggestion with multi-byte ref sigil#155428
Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom Apr 18, 2026
Merged
Fix ICE in borrowck mutability suggestion with multi-byte ref sigil#155428rust-bors[bot] merged 1 commit intorust-lang:mainfrom
rust-bors[bot] merged 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
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Apr 18, 2026
Fix ICE in borrowck mutability suggestion with multi-byte ref sigil Fixes rust-lang#139089 Similarly to rust-lang#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.
This was referenced Apr 18, 2026
rust-bors bot
pushed a commit
that referenced
this pull request
Apr 18, 2026
Rollup of 12 pull requests Successful merges: - #147811 (naked functions: respect `function-sections`) - #154935 (Add Sized supertrait for CoerceUnsized and DispatchFromDyn) - #139690 (`impl Default for RepeatN`) - #153511 (`std::any::TypeId`: remove misplaced "and" in `Unique<T>` example) - #154943 (Move recursion out of `MatchPairTree::for_pattern` helpers ) - #155295 (Fix misleading "borrowed data escapes outside of function" diagnostic) - #155427 (ptr: update text in intro text to one in with_addr doc) - #155428 (Fix ICE in borrowck mutability suggestion with multi-byte ref sigil) - #155435 (rustdoc: Fix `redundant_explicit_links` incorrectly firing (or not firing) under certain scenarios) - #155450 (Remove unnecessary safety conditions related to unchecked uint arithmetic) - #155454 (docs: Fix typo in std/src/thready/scoped.rs) - #155467 (`std::error::Request`: clean up documentation)
rust-timer
added a commit
that referenced
this pull request
Apr 18, 2026
Rollup merge of #155428 - lapla-cogito:issue_139089, r=mejrs Fix ICE in borrowck mutability suggestion with multi-byte ref sigil 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.
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.