Add note on void reference test

This test is also changed by adding a note about uninhabited references
still counting as inhabited.
This commit is contained in:
Daniel Noom 2021-01-03 20:49:35 +01:00
parent 998bf0ab88
commit 9cba8a37f9

View File

@ -23,6 +23,7 @@ LL | let _ = match x {};
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
= note: the matched value is of type `&Void`
= note: references are always considered inhabited
error[E0004]: non-exhaustive patterns: type `(Void,)` is non-empty
--> $DIR/uninhabited-matches-feature-gated.rs:18:19