]> git.lizzy.rs Git - rust.git/blob - tests/ui/floating_point_rad.fixed
Handle imports which are nested directly
[rust.git] / tests / ui / floating_point_rad.fixed
1 // run-rustfix
2 #![warn(clippy::suboptimal_flops)]
3
4 fn main() {
5     let x = 3f32;
6     let _ = x.to_degrees();
7     let _ = x.to_radians();
8     // Cases where the lint shouldn't be applied
9     let _ = x * 90f32 / std::f32::consts::PI;
10     let _ = x * std::f32::consts::PI / 90f32;
11     let _ = x * 180f32 / std::f32::consts::E;
12     let _ = x * std::f32::consts::E / 180f32;
13 }