mutex_integer suggests using AtomicIsize over Mutex<i128> #9872
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Summary
mutex_integer suggests using AtomicIsize instead of Mutex, including when I store 1<<64 to it.
The value of course is not representable as
isize
, so will cause a panic at runtime if replaced (or require an as cast that truncates).Lint Name
mutex_integer
Reproducer
I tried this code:
I saw this happen:
I expected to see this happen:
No diagnostic.
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: