clippy::arithmetic_side_effects
triggers on operations using Wrapping<T>
in no_std
environments
#11424
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
#11145 was fixed when in an environment with access to
std
. However, the exception added to fix this only works forstd::num::Wrapping
specifically. If you're using#![no_std]
, then the type has the namecore::num::Wrapping
, which is a different name, and the lint still triggers.Lint Name
arithmetic_side_effects
Reproducer
I tried this code:
I saw this happen:
I expected to see this happen:
No lints raised
As a note: removing the
#![no_std]
from the reproducer example silences the lint.Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: