Skip to content

Commit c782767

Browse files
committed
Auto merge of rust-lang#9403 - softmoth:wild_err_expect, r=Alexendoo
match_wild_err_arm: Fix typo in note text changelog: [`match_wild_err_arm`]: fix typo in note text
2 parents f51aade + 28a055d commit c782767

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

clippy_lints/src/matches/match_wild_err_arm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ pub(crate) fn check<'tcx>(cx: &LateContext<'tcx>, ex: &Expr<'tcx>, arms: &[Arm<'
4040
arm.pat.span,
4141
&format!("`Err({})` matches all errors", ident_bind_name),
4242
None,
43-
"match each error separately or use the error output, or use `.except(msg)` if the error case is unreachable",
43+
"match each error separately or use the error output, or use `.expect(msg)` if the error case is unreachable",
4444
);
4545
}
4646
}

tests/ui/match_wild_err_arm.edition2018.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,31 @@ LL | Err(_) => panic!("err"),
55
| ^^^^^^
66
|
77
= note: `-D clippy::match-wild-err-arm` implied by `-D warnings`
8-
= note: match each error separately or use the error output, or use `.except(msg)` if the error case is unreachable
8+
= note: match each error separately or use the error output, or use `.expect(msg)` if the error case is unreachable
99

1010
error: `Err(_)` matches all errors
1111
--> $DIR/match_wild_err_arm.rs:20:9
1212
|
1313
LL | Err(_) => panic!(),
1414
| ^^^^^^
1515
|
16-
= note: match each error separately or use the error output, or use `.except(msg)` if the error case is unreachable
16+
= note: match each error separately or use the error output, or use `.expect(msg)` if the error case is unreachable
1717

1818
error: `Err(_)` matches all errors
1919
--> $DIR/match_wild_err_arm.rs:26:9
2020
|
2121
LL | Err(_) => {
2222
| ^^^^^^
2323
|
24-
= note: match each error separately or use the error output, or use `.except(msg)` if the error case is unreachable
24+
= note: match each error separately or use the error output, or use `.expect(msg)` if the error case is unreachable
2525

2626
error: `Err(_e)` matches all errors
2727
--> $DIR/match_wild_err_arm.rs:34:9
2828
|
2929
LL | Err(_e) => panic!(),
3030
| ^^^^^^^
3131
|
32-
= note: match each error separately or use the error output, or use `.except(msg)` if the error case is unreachable
32+
= note: match each error separately or use the error output, or use `.expect(msg)` if the error case is unreachable
3333

3434
error: aborting due to 4 previous errors
3535

tests/ui/match_wild_err_arm.edition2021.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,31 @@ LL | Err(_) => panic!("err"),
55
| ^^^^^^
66
|
77
= note: `-D clippy::match-wild-err-arm` implied by `-D warnings`
8-
= note: match each error separately or use the error output, or use `.except(msg)` if the error case is unreachable
8+
= note: match each error separately or use the error output, or use `.expect(msg)` if the error case is unreachable
99

1010
error: `Err(_)` matches all errors
1111
--> $DIR/match_wild_err_arm.rs:20:9
1212
|
1313
LL | Err(_) => panic!(),
1414
| ^^^^^^
1515
|
16-
= note: match each error separately or use the error output, or use `.except(msg)` if the error case is unreachable
16+
= note: match each error separately or use the error output, or use `.expect(msg)` if the error case is unreachable
1717

1818
error: `Err(_)` matches all errors
1919
--> $DIR/match_wild_err_arm.rs:26:9
2020
|
2121
LL | Err(_) => {
2222
| ^^^^^^
2323
|
24-
= note: match each error separately or use the error output, or use `.except(msg)` if the error case is unreachable
24+
= note: match each error separately or use the error output, or use `.expect(msg)` if the error case is unreachable
2525

2626
error: `Err(_e)` matches all errors
2727
--> $DIR/match_wild_err_arm.rs:34:9
2828
|
2929
LL | Err(_e) => panic!(),
3030
| ^^^^^^^
3131
|
32-
= note: match each error separately or use the error output, or use `.except(msg)` if the error case is unreachable
32+
= note: match each error separately or use the error output, or use `.expect(msg)` if the error case is unreachable
3333

3434
error: aborting due to 4 previous errors
3535

0 commit comments

Comments
 (0)