]> git.proxmox.com Git - rustc.git/blob - src/tools/clippy/tests/ui/unused_rounding.rs
New upstream version 1.71.1+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / unused_rounding.rs
1 //@run-rustfix
2 #![warn(clippy::unused_rounding)]
3
4 fn main() {
5 let _ = 1f32.ceil();
6 let _ = 1.0f64.floor();
7 let _ = 1.00f32.round();
8 let _ = 2e-54f64.floor();
9
10 // issue9866
11 let _ = 3.3_f32.round();
12 let _ = 3.3_f64.round();
13 let _ = 3.0_f32.round();
14
15 let _ = 3_3.0_0_f32.round();
16 let _ = 3_3.0_1_f64.round();
17 }