2021-01-03 07:13:33 -06:00
|
|
|
enum A {}
|
2021-01-03 14:12:27 -06:00
|
|
|
//~^ NOTE `A` defined here
|
2021-01-03 07:13:33 -06:00
|
|
|
|
|
|
|
fn f(a: &A) {
|
2021-01-03 14:12:27 -06:00
|
|
|
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
|
2021-01-03 07:13:33 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|