summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/floating_point_rad.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/tools/clippy/tests/ui/floating_point_rad.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/floating_point_rad.rs b/src/tools/clippy/tests/ui/floating_point_rad.rs
index 8f3234986..f1ea73df3 100644
--- a/src/tools/clippy/tests/ui/floating_point_rad.rs
+++ b/src/tools/clippy/tests/ui/floating_point_rad.rs
@@ -8,6 +8,11 @@ pub const fn const_context() {
let _ = x * 180f32 / std::f32::consts::PI;
}
+pub fn issue9391(degrees: i64) {
+ let _ = degrees as f64 * std::f64::consts::PI / 180.0;
+ let _ = degrees as f64 * 180.0 / std::f64::consts::PI;
+}
+
fn main() {
let x = 3f32;
let _ = x * 180f32 / std::f32::consts::PI;