Open PatchMixolydic opened 1 week ago
Slightly off topic, but looking at this diagnostic, "if you just want the locking behavior and not the internal type, consider using Mutex<()>
" seems like it should be moved to a help message:
warning: consider using an `AtomicU32` instead of a `Mutex` here
--> src/lib.rs:8:53
|
8 | static NUM_INTERRUPTS_DISABLED_GUARDS: Mutex<u32> = Mutex::new(0);
| ^^^^^^^^^^^^^
|
= help: if you just want the locking behavior and not the internal type, consider using `Mutex<()>`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mutex_integer
note: the lint level is defined here
@rustbot label I-false-positive
Summary
clippy::mutex_integer
lints on usages as well as definitions, which seems redundant (and could be unactionable if this happens cross-crate).Reproducer
I tried this code (playground):
I expected to see this happen:
Instead, this happened:
Version
Additional Labels
No response