diff options
| author | Nadrieril <nadrieril+git@gmail.com> | 2019-12-02 16:35:10 +0000 |
|---|---|---|
| committer | Nadrieril <nadrieril+git@gmail.com> | 2019-12-04 16:43:21 +0000 |
| commit | 1c77a049b9595bbc857317ff8a7713c76ddbd8af (patch) | |
| tree | 9e7ea12af53d5ef75d07556920a447d544410aae /src/test/ui/pattern/usefulness | |
| parent | 1bd97ae8a19d4dc811c826bb1b66ab5ab94a8160 (diff) | |
| download | rust-1c77a049b9595bbc857317ff8a7713c76ddbd8af.tar.gz rust-1c77a049b9595bbc857317ff8a7713c76ddbd8af.zip | |
Fix erroneous comment
Diffstat (limited to 'src/test/ui/pattern/usefulness')
| -rw-r--r-- | src/test/ui/pattern/usefulness/match-empty-exhaustive_patterns.rs | 1 | ||||
| -rw-r--r-- | src/test/ui/pattern/usefulness/match-empty-exhaustive_patterns.stderr | 14 |
2 files changed, 7 insertions, 8 deletions
diff --git a/src/test/ui/pattern/usefulness/match-empty-exhaustive_patterns.rs b/src/test/ui/pattern/usefulness/match-empty-exhaustive_patterns.rs index 0a8194253a3..3d01c31f036 100644 --- a/src/test/ui/pattern/usefulness/match-empty-exhaustive_patterns.rs +++ b/src/test/ui/pattern/usefulness/match-empty-exhaustive_patterns.rs @@ -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 diff --git a/src/test/ui/pattern/usefulness/match-empty-exhaustive_patterns.stderr b/src/test/ui/pattern/usefulness/match-empty-exhaustive_patterns.stderr index 8d143494026..19c16dba000 100644 --- a/src/test/ui/pattern/usefulness/match-empty-exhaustive_patterns.stderr +++ b/src/test/ui/pattern/usefulness/match-empty-exhaustive_patterns.stderr @@ -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 {} | ^^^^^^^^^^^^^^^^^ |
