mirror of
https://github.com/rust-lang/rust.git
synced 2025-11-08 02:08:10 +00:00
12 lines
255 B
Rust
12 lines
255 B
Rust
enum A {}
|
|
//~^ NOTE `A` defined here
|
|
|
|
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() {}
|