Disallow reference to static mut and adding static_mut_ref lint#117556
Disallow reference to static mut and adding static_mut_ref lint#117556bors merged 6 commits intorust-lang:masterfrom
static mut and adding static_mut_ref lint#117556Conversation
This comment has been minimized.
This comment has been minimized.
743f1ee to
f3bfb1d
Compare
|
I wonder if you could also implement the error part for edition 2024, similar to how it's done here. Asking because then it might not be done in a lint pass any more? E.g. |
f3bfb1d to
de71124
Compare
|
Some changes occurred in diagnostic error codes |
static_mut_ref lintstatic mut and adding static_mut_ref lint
This comment has been minimized.
This comment has been minimized.
de71124 to
2389d7d
Compare
This comment has been minimized.
This comment has been minimized.
2389d7d to
e0abb31
Compare
|
Some additional points:
|
Note that I'm not arguing here that we should never make all of |
|
Thanks for making a PR for this! Unfortunately, I'm not personally familiar with the lint system, so while I'm happy to look at the tests to see what it's doing (est31's suggestions in #117556 (comment) sound good), I'm not a good reviewer for it technically. r? compiler |
e0abb31 to
b4f1f06
Compare
|
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. |
|
cc @RalfJung because it was your idea and |
|
@bors r=davidtwco |
This comment has been minimized.
This comment has been minimized.
|
💔 Test failed - checks-actions |
|
@bors r=davidtwco |
|
💥 Test timed out |
|
Hmm, let's retry that? |
|
Some questions about this:
|
|
As mentioned in #114447 (comment), you can always change The problem with taking references to For more reading, there's been discussion and slow movement for at least 5 years towards limiting static mut. See #53639 for example. |
Closes #114447
r? @scottmcm