]> git.proxmox.com Git - rustc.git/blobdiff - src/tools/clippy/tests/ui/match_same_arms_non_exhaustive.rs
New upstream version 1.74.1+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / match_same_arms_non_exhaustive.rs
index 07421173a3381182a71955af442826e680d804c7..1ee048bf7f6c3d398807f54dd120a2b1de41f894 100644 (file)
@@ -1,7 +1,7 @@
 #![feature(non_exhaustive_omitted_patterns_lint)]
 #![warn(clippy::match_same_arms)]
 #![no_main]
-
+//@no-rustfix
 use std::sync::atomic::Ordering; // #[non_exhaustive] enum
 
 pub fn f(x: Ordering) {
@@ -39,6 +39,7 @@ pub fn g(x: Ordering) {
         Ordering::Release => println!("release"),
         Ordering::Acquire => println!("acquire"),
         Ordering::AcqRel | Ordering::SeqCst => panic!(),
+        //~^ ERROR: this match arm has an identical body to the `_` wildcard arm
         _ => panic!(),
     }
 }
@@ -52,6 +53,7 @@ mod g {
             Ordering::Release => println!("release"),
             Ordering::Acquire => println!("acquire"),
             Ordering::AcqRel | Ordering::SeqCst => panic!(),
+            //~^ ERROR: this match arm has an identical body to the `_` wildcard arm
             _ => panic!(),
         }
     }