2019-08-04 01:24:23 -05:00
|
|
|
// run-rustfix
|
|
|
|
|
|
|
|
#![warn(clippy::unnecessary_cast)]
|
|
|
|
#![allow(clippy::no_effect, clippy::unnecessary_operation)]
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
// casting integer literal to float is unnecessary
|
|
|
|
100_f32;
|
|
|
|
100_f64;
|
|
|
|
100_f64;
|
|
|
|
// Should not trigger
|
|
|
|
#[rustfmt::skip]
|
|
|
|
let v = vec!(1);
|
|
|
|
&v as &[i32];
|
|
|
|
1.0 as f64;
|
|
|
|
1 as u64;
|
2020-03-02 02:49:33 -06:00
|
|
|
0x42 as f32;
|
2019-08-04 01:24:23 -05:00
|
|
|
}
|