]> git.lizzy.rs Git - rust.git/blob - tests/ui/unnecessary_cast_fixable.fixed
Auto merge of #4478 - tsurai:master, r=flip1995
[rust.git] / tests / ui / unnecessary_cast_fixable.fixed
1 // run-rustfix
2
3 #![warn(clippy::unnecessary_cast)]
4 #![allow(clippy::no_effect, clippy::unnecessary_operation)]
5
6 fn main() {
7     // casting integer literal to float is unnecessary
8     100_f32;
9     100_f64;
10     100_f64;
11     // Should not trigger
12     #[rustfmt::skip]
13     let v = vec!(1);
14     &v as &[i32];
15     1.0 as f64;
16     1 as u64;
17 }