]> git.proxmox.com Git - rustc.git/blobdiff - src/tools/clippy/tests/ui/suspicious_xor_used_as_pow.rs
New upstream version 1.74.1+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / suspicious_xor_used_as_pow.rs
index eb9fc63fb1d4692f2da82445f19857d79a4200c2..a5319e1b2308e7e26ab4eab79020d17c4d39ab78 100644 (file)
@@ -1,7 +1,7 @@
 #![allow(unused)]
 #![warn(clippy::suspicious_xor_used_as_pow)]
 #![allow(clippy::eq_op)]
-
+//@no-rustfix
 macro_rules! macro_test {
     () => {
         13
@@ -17,11 +17,18 @@ macro_rules! macro_test_inside {
 fn main() {
     // Should warn:
     let _ = 2 ^ 5;
+    //~^ ERROR: `^` is not the exponentiation operator
+    //~| NOTE: `-D clippy::suspicious-xor-used-as-pow` implied by `-D warnings`
     let _ = 2i32 ^ 9i32;
+    //~^ ERROR: `^` is not the exponentiation operator
     let _ = 2i32 ^ 2i32;
+    //~^ ERROR: `^` is not the exponentiation operator
     let _ = 50i32 ^ 3i32;
+    //~^ ERROR: `^` is not the exponentiation operator
     let _ = 5i32 ^ 8i32;
+    //~^ ERROR: `^` is not the exponentiation operator
     let _ = 2i32 ^ 32i32;
+    //~^ ERROR: `^` is not the exponentiation operator
     macro_test_inside!();
 
     // Should not warn: