Tracking Issue for Rust 2024: Deny references to static mut #123758
Closed
Description
opened on Apr 10, 2024
This is a tracking issue for disallowing references to static mut
items in Rust 2024:
- Disallow *references* to
static mut
[Edition Idea] #114447 - Disallow reference to
static mut
and addingstatic_mut_ref
lint #117556
About tracking issues
Tracking issues are used to record the overall progress of implementation. They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions. A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature. Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Steps
- Implement in nightly Rust 2024.
- N/A: Implement migration lints.
- We're OK doing this without migration lints as we want people to carefully review any code that is affected by this.
- Merge PR to extend this to hidden references.
- Make this a
deny-by-default
lint rather than a hard error. - N/A: Add documentation to the dev guide.
- See the instructions.
- N/A: Add documentation to the reference.
- This is just a lint now (though a
deny-by-default
one), and we don't need to document those.
- This is just a lint now (though a
- Add documentation to the edition guide.
- Ensure ready for Rust 2024 stabilization.
Related items
- Flesh out detail behind disallowing refs to static mut edition-guide#299
- Disallow *references* to
static mut
[Edition Idea] #114447 - Disallow reference to
static mut
and addingstatic_mut_ref
lint #117556 - suggest mut removal sometimes for static mut ref lint/error #120574
- static_mut_refs: Should the lint cover hidden references? #123060
- static_mut_refs: Automatic edition migration #123061
- static_mut_refs: Should the lint cover hidden references? #123060
- static_mut_refs: Need edition migration guide documentation #123059
- Disallow hidden references to mutable static #124895
- Lint at
deny-by-default
against references tostatic mut
#128794
Activity