]> git.proxmox.com Git - rustc.git/blame - src/test/ui/pattern/usefulness/issue-78123-non-exhaustive-reference.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / pattern / usefulness / issue-78123-non-exhaustive-reference.rs
CommitLineData
5869c6ff
XL
1enum A {}
2 //~^ NOTE `A` defined here
5e7ed085 3 //~| NOTE
5869c6ff
XL
4
5fn f(a: &A) {
6 match a {}
7 //~^ ERROR non-exhaustive patterns: type `&A` is non-empty
8 //~| NOTE the matched value is of type `&A`
9 //~| NOTE references are always considered inhabited
10}
11
12fn main() {}