Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add notes to stderr of non-exhaustive-reference test
- Loading branch information
Daniel Noom
committed
Jan 3, 2021
1 parent
9cba8a3
commit 914bc17
Showing
2 changed files
with
6 additions
and
2 deletions.
There are no files selected for viewing
6 changes: 5 additions & 1 deletion
6
src/test/ui/pattern/usefulness/issue-78123-non-exhaustive-reference.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() {} |
2 changes: 1 addition & 1 deletion
2
src/test/ui/pattern/usefulness/issue-78123-non-exhaustive-reference.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters