]> git.proxmox.com Git - rustc.git/blobdiff - src/tools/clippy/tests/ui/floating_point_powi.fixed
New upstream version 1.66.0+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / floating_point_powi.fixed
index 5758db7c6c82d90506cc76a561f5d3ac18dfe021..884d05fed71ba2f650100a8e1db301ac3c5731e7 100644 (file)
@@ -1,5 +1,6 @@
 // run-rustfix
 #![warn(clippy::suboptimal_flops)]
+#![allow(clippy::unnecessary_cast)]
 
 fn main() {
     let one = 1;
@@ -7,7 +8,9 @@ fn main() {
 
     let y = 4f32;
     let _ = x.mul_add(x, y);
+    let _ = x.mul_add(x, -y);
     let _ = y.mul_add(y, x);
+    let _ = y.mul_add(-y, x);
     let _ = (y as f32).mul_add(y as f32, x);
     let _ = x.mul_add(x, y).sqrt();
     let _ = y.mul_add(y, x).sqrt();