Skip to content

Commit

Permalink
Add notes to stderr of non-exhaustive-reference test
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Noom committed Jan 3, 2021
1 parent 9cba8a3 commit 914bc17
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
@@ -1,7 +1,11 @@
enum A {}
//~^ NOTE `A` defined here

fn f(a: &A) {
match a {} //~ ERROR non-exhaustive patterns: type `&A` is non-empty
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() {}
@@ -1,5 +1,5 @@
error[E0004]: non-exhaustive patterns: type `&A` is non-empty
--> $DIR/issue-78123-non-exhaustive-reference.rs:4:11
--> $DIR/issue-78123-non-exhaustive-reference.rs:5:11
|
LL | enum A {}
| --------- `A` defined here
Expand Down

0 comments on commit 914bc17

Please sign in to comment.