mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 02:03:53 +00:00
18 lines
395 B
Plaintext
18 lines
395 B
Plaintext
|
// run-rustfix
|
||
|
|
||
|
#[warn(clippy::cast_lossless)]
|
||
|
#[allow(clippy::no_effect, clippy::unnecessary_operation)]
|
||
|
fn main() {
|
||
|
// Test clippy::cast_lossless with casts to floating-point types
|
||
|
f32::from(1i8);
|
||
|
f64::from(1i8);
|
||
|
f32::from(1u8);
|
||
|
f64::from(1u8);
|
||
|
f32::from(1i16);
|
||
|
f64::from(1i16);
|
||
|
f32::from(1u16);
|
||
|
f64::from(1u16);
|
||
|
f64::from(1i32);
|
||
|
f64::from(1u32);
|
||
|
}
|