mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-30 12:07:40 +00:00
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
|
||
|
}
|
||
|
}
|