blob: 18e3aecbd0db98c7f7d070c7c7145e1449f26f35 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
//@ 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
}
}
|