Skip to content

Commit 4f1c4a9

Browse files
RickyRicky
Ricky
authored and
Ricky
committed
Fixed typo in lint and test
1 parent c31d473 commit 4f1c4a9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

clippy_lints/src/map_err_ignore.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use rustc_session::{declare_lint_pass, declare_tool_lint};
77
declare_clippy_lint! {
88
/// **What it does:** Checks for instances of `map_err(|_| Some::Enum)`
99
///
10-
/// **Why is this bad?** This map_err throws away the original error rather than allowing the enum to bubble the original error
10+
/// **Why is this bad?** This map_err throws away the original error rather than allowing the enum to contain and report the cause of the error
1111
///
1212
/// **Known problems:** None.
1313
///
@@ -133,7 +133,7 @@ impl<'tcx> LateLintPass<'tcx> for MapErrIgnore {
133133
cx,
134134
MAP_ERR_IGNORE,
135135
body_span,
136-
"`map_else(|_|...` ignores the original error",
136+
"`map_err(|_|...` ignores the original error",
137137
None,
138138
"Consider wrapping the error in an enum variant",
139139
);

tests/ui/map_err.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: `map_else(|_|...` ignores the original error
1+
error: `map_err(|_|...` ignores the original error
22
--> $DIR/map_err.rs:21:32
33
|
44
LL | println!("{:?}", x.map_err(|_| Errors::Ignored));

0 commit comments

Comments
 (0)