Open pitaj opened 6 months ago
@rustbot claim
@rustbot claim
@archief2910 see the discussion in the previous implementation pr: https://github.com/rust-lang/rust-clippy/pull/12914
Essentially, you may want to wait until we know more about the direction in rustc and std.
You also shouldn't claim an issue that's already assigned, without first attempting to contact the assignee.
sorry @pitaj it was by mistake that's why i unassigned the issue
What it does
The
static_mut_refs
rustc lint checks for shared or mutable references of mutable statics. This catches most incorrect uses, but doesn't necessarily accomplish the goal of moving the ecosystem away fromstatic mut
entirely.The
static_mut
clippy lint will check for any declarations of mutable statics, and recommend using an immutable static with a type with interior mutability instead.Advantage
Move the ecosystem away from
static mut
. May even catch some unsoundness issues.Drawbacks
Churn
Example
Could be written as:
It would be good to point people to the edition guide explanation and the higher level sync objects docs.