Closed
Description
.rem_euclid
and .div_euclid
always results in a non-negative value, so casting to the same or larger size (except unsigned) should be allowed.
(-1_001).rem_euclid(1_000 as i16) as u16
There are also checked versions of these functions (.checked_rem_euclid
and .checked_div_euclid
) which should also be handled.
Version: clippy 0.0.212 (c8e3cfb 2019-10-28)