about summary refs log tree commit diff
path: root/tests/ui/pattern/usefulness/issue-78123-non-exhaustive-reference.rs
blob: 6c5a331b4b564ebdc5e372b72e38242c75ccf53a (plain)
1
2
3
4
5
6
7
8
9
10
11
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() {}