mirror of https://github.com/rust-lang/rust
24 lines
435 B
Rust
24 lines
435 B
Rust
//@ run-rustfix
|
|
#![feature(never_patterns)]
|
|
#![feature(exhaustive_patterns)]
|
|
#![allow(incomplete_features)]
|
|
#![deny(unreachable_patterns)]
|
|
|
|
enum Void {}
|
|
|
|
#[rustfmt::skip]
|
|
fn main() {
|
|
let res: Result<(), Void> = Ok(());
|
|
match res {
|
|
Ok(_) => {}
|
|
//~ ERROR unreachable
|
|
//~ ERROR unreachable
|
|
}
|
|
|
|
match res {
|
|
Ok(_x) => {}
|
|
//~ ERROR unreachable
|
|
//~ ERROR unreachable
|
|
}
|
|
}
|