deref_addrof
conflicts with the suggestion of the rustc static_mut_refs
lint
#13783
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-negative
Issue: The lint should have been triggered on code, but wasn't
Description
Since 1.83, the compiler warns when creating a shared reference to a mutable static:
Gives this warning:
Following the suggestion, we can write this:
But then clippy says this:
I get why clippy says that, but I don't really see a clean solution to this with the current lints, apart from simply disabling one of them.
A different way to look at it: the suggested fix from clippy triggers the
static_mut_refs
lint.Version
Additional Labels
@rustbot label D-confusing
The text was updated successfully, but these errors were encountered: