]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/cast_abs_to_unsigned.fixed
Rollup merge of #96860 - semarie:openbsd-futex-time64, r=cuviper
[rust.git] / src / tools / clippy / tests / ui / cast_abs_to_unsigned.fixed
1 // run-rustfix
2 #![warn(clippy::cast_abs_to_unsigned)]
3
4 fn main() {
5     let x: i32 = -42;
6     let y: u32 = x.unsigned_abs();
7     println!("The absolute value of {} is {}", x, y);
8 }