Fix erroneous comment

This commit is contained in:
Nadrieril 2019-12-02 16:35:10 +00:00
parent 1bd97ae8a1
commit 1c77a049b9
2 changed files with 7 additions and 8 deletions

View file

@ -23,7 +23,6 @@ fn foo(x: Foo) {
}
fn main() {
// `exhaustive_patterns` is not on, so uninhabited branches are not detected as unreachable.
match None::<!> {
None => {}
Some(_) => {} //~ ERROR unreachable pattern

View file

@ -11,19 +11,19 @@ LL | #![deny(unreachable_patterns)]
| ^^^^^^^^^^^^^^^^^^^^
error: unreachable pattern
--> $DIR/match-empty-exhaustive_patterns.rs:29:9
--> $DIR/match-empty-exhaustive_patterns.rs:28:9
|
LL | Some(_) => {}
| ^^^^^^^
error: unreachable pattern
--> $DIR/match-empty-exhaustive_patterns.rs:33:9
--> $DIR/match-empty-exhaustive_patterns.rs:32:9
|
LL | Some(_) => {}
| ^^^^^^^
error[E0004]: non-exhaustive patterns: type `u8` is non-empty
--> $DIR/match-empty-exhaustive_patterns.rs:36:11
--> $DIR/match-empty-exhaustive_patterns.rs:35:11
|
LL | match 0u8 {}
| ^^^
@ -31,7 +31,7 @@ LL | match 0u8 {}
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
error[E0004]: non-exhaustive patterns: type `NonEmptyStruct` is non-empty
--> $DIR/match-empty-exhaustive_patterns.rs:38:11
--> $DIR/match-empty-exhaustive_patterns.rs:37:11
|
LL | match NonEmptyStruct(true) {}
| ^^^^^^^^^^^^^^^^^^^^
@ -39,7 +39,7 @@ LL | match NonEmptyStruct(true) {}
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
error[E0004]: non-exhaustive patterns: type `NonEmptyEnum1` is non-empty
--> $DIR/match-empty-exhaustive_patterns.rs:40:11
--> $DIR/match-empty-exhaustive_patterns.rs:39:11
|
LL | match NonEmptyEnum1::Foo(true) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
@ -47,7 +47,7 @@ LL | match NonEmptyEnum1::Foo(true) {}
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
error[E0004]: non-exhaustive patterns: type `NonEmptyEnum2` is non-empty
--> $DIR/match-empty-exhaustive_patterns.rs:42:11
--> $DIR/match-empty-exhaustive_patterns.rs:41:11
|
LL | match NonEmptyEnum2::Foo(true) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
@ -55,7 +55,7 @@ LL | match NonEmptyEnum2::Foo(true) {}
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
error[E0004]: non-exhaustive patterns: type `NonEmptyEnum5` is non-empty
--> $DIR/match-empty-exhaustive_patterns.rs:44:11
--> $DIR/match-empty-exhaustive_patterns.rs:43:11
|
LL | match NonEmptyEnum5::V1 {}
| ^^^^^^^^^^^^^^^^^