Lint explanation
Unsigned subtraction is likely to introduce underflow bugs. These bugs won't be caught in release mode.
Example code
Lint should disallow following code
let len: usize = vec.len();
let max_len: usize = 1000;
let available_space = max_len - len; // likely to underflow
while allowing both
let space = max_len.wrapping/saturating/checked_sub(len)
and
let len: isize = vec.len() as i32;
let max_len: isize = 1000;
let space = max_len - len;
Lint explanation
Unsigned subtraction is likely to introduce underflow bugs. These bugs won't be caught in release mode.
Example code
Lint should disallow following code
while allowing both
and