rust-lang/rust-clippy
View on GitHubLint `static mut FOO: T` where `T` has a safe counterpart
Open
#4,070 opened on May 8, 2019
A-lintL-correctnessgood first issue
Repository metrics
- Stars
- (10,406 stars)
- PR merge metrics
- (Avg merge 19d 22h) (113 merged PRs in 30d)
Description
There is no reason to ever write static mut FOO: u32. Instead one should use static FOO: AtomicU32 which does the same thing, is just as efficient and requires no unsafe code.
We should lint this for at least
u8,u16,u32,u64i8,i16,i32,i64isize,usizebool*mut T