Skip to content

Commit

Permalink
Auto merge of rust-lang#9403 - softmoth:wild_err_expect, r=Alexendoo
Browse files Browse the repository at this point in the history
match_wild_err_arm: Fix typo in note text

changelog: [`match_wild_err_arm`]: fix typo in note text
  • Loading branch information
bors committed Aug 31, 2022
2 parents f51aade + 28a055d commit c782767
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion clippy_lints/src/matches/match_wild_err_arm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub(crate) fn check<'tcx>(cx: &LateContext<'tcx>, ex: &Expr<'tcx>, arms: &[Arm<'
arm.pat.span,
&format!("`Err({})` matches all errors", ident_bind_name),
None,
"match each error separately or use the error output, or use `.except(msg)` if the error case is unreachable",
"match each error separately or use the error output, or use `.expect(msg)` if the error case is unreachable",
);
}
}
Expand Down
8 changes: 4 additions & 4 deletions tests/ui/match_wild_err_arm.edition2018.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,31 @@ LL | Err(_) => panic!("err"),
| ^^^^^^
|
= note: `-D clippy::match-wild-err-arm` implied by `-D warnings`
= note: match each error separately or use the error output, or use `.except(msg)` if the error case is unreachable
= note: match each error separately or use the error output, or use `.expect(msg)` if the error case is unreachable

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

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

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

error: aborting due to 4 previous errors

8 changes: 4 additions & 4 deletions tests/ui/match_wild_err_arm.edition2021.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,31 @@ LL | Err(_) => panic!("err"),
| ^^^^^^
|
= note: `-D clippy::match-wild-err-arm` implied by `-D warnings`
= note: match each error separately or use the error output, or use `.except(msg)` if the error case is unreachable
= note: match each error separately or use the error output, or use `.expect(msg)` if the error case is unreachable

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

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

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

error: aborting due to 4 previous errors

0 comments on commit c782767

Please sign in to comment.