]> git.lizzy.rs Git - rust.git/blob - src/test/ui/pattern/usefulness/issue-78123-non-exhaustive-reference.rs
Rollup merge of #96051 - newpavlov:duration_rounding, r=nagisa,joshtriplett
[rust.git] / src / test / ui / pattern / usefulness / issue-78123-non-exhaustive-reference.rs
1 enum A {}
2     //~^ NOTE `A` defined here
3     //~| NOTE
4
5 fn 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
12 fn main() {}