]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/neg_multiply.rs
Auto merge of #8374 - Alexendoo:bless-revisions, r=camsteffen
[rust.git] / tests / ui / neg_multiply.rs
index d4a20ce9db1c843a3419ca44107a1aaf5f52dacd..7dbdb0906ceeb3e7f17c3b480b94c141f25bad01 100644 (file)
@@ -1,5 +1,7 @@
+// run-rustfix
 #![warn(clippy::neg_multiply)]
-#![allow(clippy::no_effect, clippy::unnecessary_operation)]
+#![allow(clippy::no_effect, clippy::unnecessary_operation, clippy::precedence)]
+#![allow(unused)]
 
 use std::ops::Mul;
 
@@ -28,6 +30,14 @@ fn main() {
 
     -1 * x;
 
+    100 + x * -1;
+
+    (100 + x) * -1;
+
+    -1 * 17;
+
+    0xcafe | 0xff00 * -1;
+
     -1 * -1; // should be ok
 
     X * -1; // should be ok