blob: cbfcf0eafd4901032ddf5b67f6825592d3b9ed70 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
enum A {}
//~^ NOTE `A` defined here
//~| NOTE
fn f(a: &A) {
match a {}
//~^ ERROR non-exhaustive patterns: type `&A` is non-empty
//~| NOTE the matched value is of type `&A`
//~| NOTE references are always considered inhabited
}
fn main() {}
|