mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
13 lines
269 B
Rust
13 lines
269 B
Rust
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() {}
|