Skip to content

Commit 9cba8a3

Browse files
author
Daniel Noom
committed
Add note on void reference test
This test is also changed by adding a note about uninhabited references still counting as inhabited.
1 parent 998bf0a commit 9cba8a3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ LL | let _ = match x {};
2323
|
2424
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
2525
= note: the matched value is of type `&Void`
26+
= note: references are always considered inhabited
2627

2728
error[E0004]: non-exhaustive patterns: type `(Void,)` is non-empty
2829
--> $DIR/uninhabited-matches-feature-gated.rs:18:19

0 commit comments

Comments
 (0)