Lint on uses of XOR as if it were POW: 2 ^ 32
#61934
Labels
A-lints
Area: Lints (warnings about flaws in source code) such as unused_mut.
2 ^ 32
#61934
Given
2^32
is a common enough mistake to make, to the point that GCC is adding a lint for it, we probably should lint2 ^ 8
,2 ^ 16
,2 ^ 32
and2 ^ 64
as well and suggest2u64.pow(x)
or even betterstd::u64::MAX
.The text was updated successfully, but these errors were encountered: