Prematurely lint against const numbers that would trigger overflowing_literals
on platforms with smaller usize
/isize
s
#13943
Labels
A-lint
Area: New lints
What it does
Detect const
usize
/isize
values that correctly build for 64 bit targets but break the build withoverflowing_literals
on 32 bit or 16 bit targets.Advantage
usize
/isize
, and suggest replacing them withu64
/i64
Drawbacks
No response
Example
Could be written as:
The text was updated successfully, but these errors were encountered: