]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/tests/ui/floating_point_powf.rs
Rollup merge of #100291 - WaffleLapkin:cstr_const_methods, r=oli-obk
[rust.git] / src / tools / clippy / tests / ui / floating_point_powf.rs
index 445080417f2ed8c2a0e5b7f1f1a799286077c2f8..d749aa2d48a418d79552a77eb44f403738217d0a 100644 (file)
@@ -18,6 +18,11 @@ fn main() {
     let _ = x.powf(-16_777_215.0);
     let _ = (x as f32).powf(-16_777_215.0);
     let _ = (x as f32).powf(3.0);
+    let _ = (1.5_f32 + 1.0).powf(1.0 / 3.0);
+    let _ = 1.5_f64.powf(1.0 / 3.0);
+    let _ = 1.5_f64.powf(1.0 / 2.0);
+    let _ = 1.5_f64.powf(3.0);
+
     // Cases where the lint shouldn't be applied
     let _ = x.powf(2.1);
     let _ = x.powf(-2.1);