Clarify undecided semantics
This commit is contained in:
parent
d2b340758b
commit
32a8dec889
3 changed files with 10 additions and 4 deletions
|
|
@ -1,3 +1,6 @@
|
|||
// The precise semantics of inhabitedness with respect to unions and references is currently
|
||||
// undecided. This test file currently checks a conservative choice.
|
||||
|
||||
#![feature(exhaustive_patterns)]
|
||||
#![feature(never_type)]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,23 +1,23 @@
|
|||
error[E0004]: non-exhaustive patterns: type &'static ! is non-empty
|
||||
--> $DIR/always-inhabited-union-ref.rs:20:11
|
||||
--> $DIR/always-inhabited-union-ref.rs:23:11
|
||||
|
|
||||
LL | match uninhab_ref() {
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||
--> $DIR/always-inhabited-union-ref.rs:20:11
|
||||
--> $DIR/always-inhabited-union-ref.rs:23:11
|
||||
|
|
||||
LL | match uninhab_ref() {
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error[E0004]: non-exhaustive patterns: type Foo is non-empty
|
||||
--> $DIR/always-inhabited-union-ref.rs:24:11
|
||||
--> $DIR/always-inhabited-union-ref.rs:27:11
|
||||
|
|
||||
LL | match uninhab_union() {
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||
--> $DIR/always-inhabited-union-ref.rs:24:11
|
||||
--> $DIR/always-inhabited-union-ref.rs:27:11
|
||||
|
|
||||
LL | match uninhab_union() {
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue