Skip to content

Commit 1c77a04

Browse files
committed
Fix erroneous comment
1 parent 1bd97ae commit 1c77a04

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

src/test/ui/pattern/usefulness/match-empty-exhaustive_patterns.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ fn foo(x: Foo) {
2323
}
2424

2525
fn main() {
26-
// `exhaustive_patterns` is not on, so uninhabited branches are not detected as unreachable.
2726
match None::<!> {
2827
None => {}
2928
Some(_) => {} //~ ERROR unreachable pattern

src/test/ui/pattern/usefulness/match-empty-exhaustive_patterns.stderr

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,51 +11,51 @@ LL | #![deny(unreachable_patterns)]
1111
| ^^^^^^^^^^^^^^^^^^^^
1212

1313
error: unreachable pattern
14-
--> $DIR/match-empty-exhaustive_patterns.rs:29:9
14+
--> $DIR/match-empty-exhaustive_patterns.rs:28:9
1515
|
1616
LL | Some(_) => {}
1717
| ^^^^^^^
1818

1919
error: unreachable pattern
20-
--> $DIR/match-empty-exhaustive_patterns.rs:33:9
20+
--> $DIR/match-empty-exhaustive_patterns.rs:32:9
2121
|
2222
LL | Some(_) => {}
2323
| ^^^^^^^
2424

2525
error[E0004]: non-exhaustive patterns: type `u8` is non-empty
26-
--> $DIR/match-empty-exhaustive_patterns.rs:36:11
26+
--> $DIR/match-empty-exhaustive_patterns.rs:35:11
2727
|
2828
LL | match 0u8 {}
2929
| ^^^
3030
|
3131
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
3232

3333
error[E0004]: non-exhaustive patterns: type `NonEmptyStruct` is non-empty
34-
--> $DIR/match-empty-exhaustive_patterns.rs:38:11
34+
--> $DIR/match-empty-exhaustive_patterns.rs:37:11
3535
|
3636
LL | match NonEmptyStruct(true) {}
3737
| ^^^^^^^^^^^^^^^^^^^^
3838
|
3939
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
4040

4141
error[E0004]: non-exhaustive patterns: type `NonEmptyEnum1` is non-empty
42-
--> $DIR/match-empty-exhaustive_patterns.rs:40:11
42+
--> $DIR/match-empty-exhaustive_patterns.rs:39:11
4343
|
4444
LL | match NonEmptyEnum1::Foo(true) {}
4545
| ^^^^^^^^^^^^^^^^^^^^^^^^
4646
|
4747
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
4848

4949
error[E0004]: non-exhaustive patterns: type `NonEmptyEnum2` is non-empty
50-
--> $DIR/match-empty-exhaustive_patterns.rs:42:11
50+
--> $DIR/match-empty-exhaustive_patterns.rs:41:11
5151
|
5252
LL | match NonEmptyEnum2::Foo(true) {}
5353
| ^^^^^^^^^^^^^^^^^^^^^^^^
5454
|
5555
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
5656

5757
error[E0004]: non-exhaustive patterns: type `NonEmptyEnum5` is non-empty
58-
--> $DIR/match-empty-exhaustive_patterns.rs:44:11
58+
--> $DIR/match-empty-exhaustive_patterns.rs:43:11
5959
|
6060
LL | match NonEmptyEnum5::V1 {}
6161
| ^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)