#![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) {
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!(),
}
}
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!(),
}
}