-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
rustc_borrowck: Stop suggesting the invalid syntax &mut raw const
#134244
Merged
+70
−16
Conversation
This file contains 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
rustbot
added
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
Dec 13, 2024
jieyouxu
approved these changes
Dec 13, 2024
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! I left some feedback, but looks good otherwise.
tests/ui/borrowck/no-invalid-mut-suggestion-for-raw-pointer-issue-127562.rs
Outdated
Show resolved
Hide resolved
@rustbot author |
rustbot
added
S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Dec 13, 2024
So that it becomes easy for a later commit to return `None`.
The test fails in this commit. The next commit fixes it.
A legitimate suggestion would be to change from &raw const val to &raw mut val But until we have figured out how to make that happen we should at least stop suggesting invalid syntax.
Enselic
force-pushed
the
no-mut-hint-for-raw-ref
branch
from
December 13, 2024 15:38
f1baf80
to
f6cb227
Compare
Enselic
changed the title
rustc_borrowck: Stop suggesting invalid syntax
rustc_borrowck: Stop suggesting the invalid syntax Dec 13, 2024
&mut raw const
&mut raw const
jieyouxu
approved these changes
Dec 13, 2024
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!
@bors r+ rollup |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
labels
Dec 13, 2024
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Dec 13, 2024
…=jieyouxu rustc_borrowck: Stop suggesting the invalid syntax `&mut raw const` A legitimate suggestion would be to change from &raw const val to &raw mut val But until we have figured out how to make that happen we should at least stop suggesting invalid syntax. I recommend review commit-by-commit. Part of rust-lang#127562
This was referenced Dec 13, 2024
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Dec 14, 2024
…=jieyouxu rustc_borrowck: Stop suggesting the invalid syntax `&mut raw const` A legitimate suggestion would be to change from &raw const val to &raw mut val But until we have figured out how to make that happen we should at least stop suggesting invalid syntax. I recommend review commit-by-commit. Part of rust-lang#127562
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Dec 14, 2024
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#134181 (Tweak multispan rendering to reduce output length) - rust-lang#134209 (validate `--skip` and `--exclude` paths) - rust-lang#134231 (rustdoc-search: fix mismatched path when parent re-exported twice) - rust-lang#134236 (crashes: more tests v2) - rust-lang#134240 (Only dist `llvm-objcopy` if llvm tools are enabled) - rust-lang#134244 (rustc_borrowck: Stop suggesting the invalid syntax `&mut raw const`) - rust-lang#134251 (A bunch of cleanups (part 2)) - rust-lang#134256 (Use a more precise span in placeholder_type_error_diag) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Dec 14, 2024
Rollup merge of rust-lang#134244 - Enselic:no-mut-hint-for-raw-ref, r=jieyouxu rustc_borrowck: Stop suggesting the invalid syntax `&mut raw const` A legitimate suggestion would be to change from &raw const val to &raw mut val But until we have figured out how to make that happen we should at least stop suggesting invalid syntax. I recommend review commit-by-commit. Part of rust-lang#127562
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
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.
A legitimate suggestion would be to change from
to
But until we have figured out how to make that happen we should at least
stop suggesting invalid syntax.
I recommend review commit-by-commit.
Part of #127562