summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/floating_point_powf.fixed
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/tests/ui/floating_point_powf.fixed')
-rw-r--r--src/tools/clippy/tests/ui/floating_point_powf.fixed8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/floating_point_powf.fixed b/src/tools/clippy/tests/ui/floating_point_powf.fixed
index b0641a100..e7ef45634 100644
--- a/src/tools/clippy/tests/ui/floating_point_powf.fixed
+++ b/src/tools/clippy/tests/ui/floating_point_powf.fixed
@@ -11,10 +11,18 @@ fn main() {
let _ = (-3.1f32).exp();
let _ = x.sqrt();
let _ = x.cbrt();
+ let _ = (x as f32).cbrt();
let _ = x.powi(3);
let _ = x.powi(-2);
let _ = x.powi(16_777_215);
let _ = x.powi(-16_777_215);
+ let _ = (x as f32).powi(-16_777_215);
+ let _ = (x as f32).powi(3);
+ let _ = (1.5_f32 + 1.0).cbrt();
+ let _ = 1.5_f64.cbrt();
+ let _ = 1.5_f64.sqrt();
+ let _ = 1.5_f64.powi(3);
+
// Cases where the lint shouldn't be applied
let _ = x.powf(2.1);
let _ = x.powf(-2.1);