]> git.lizzy.rs Git - rust.git/blob - tests/ui/cast_lossless_float.rs
Adapt the *.stderr files of the ui-tests to the tool_lints
[rust.git] / tests / ui / cast_lossless_float.rs
1 #![feature(tool_lints)]
2
3 #[warn(clippy::cast_lossless)]
4 #[allow(clippy::no_effect, clippy::unnecessary_operation)]
5 fn main() {
6     // Test clippy::cast_lossless with casts to floating-point types
7     1i8 as f32;
8     1i8 as f64;
9     1u8 as f32;
10     1u8 as f64;
11     1i16 as f32;
12     1i16 as f64;
13     1u16 as f32;
14     1u16 as f64;
15     1i32 as f64;
16     1u32 as f64;
17 }