This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ use rustc_session::{declare_lint_pass, declare_tool_lint};
77declare_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 contain and report the cause of the 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 ///
@@ -135,7 +135,7 @@ impl<'tcx> LateLintPass<'tcx> for MapErrIgnore {
135135 body_span,
136136 "`map_err(|_|...` wildcard pattern discards the original error" ,
137137 None ,
138- "Consider storing the original error as a source in the new error, or silence this warning using an ignored identifier (`.map_err(|_foo| ...`)" ,
138+ "consider storing the original error as a source in the new error, or silence this warning using an ignored identifier (`.map_err(|_foo| ...`)" ,
139139 ) ;
140140 }
141141 }
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ LL | println!("{:?}", x.map_err(|_| Errors::Ignored));
55 | ^^^
66 |
77 = note: `-D clippy::map-err-ignore` implied by `-D warnings`
8- = help: Consider storing the original error as a source in the new error, or silence this warning using an ignored identifier (`.map_err(|_foo| ...`)
8+ = help: consider storing the original error as a source in the new error, or silence this warning using an ignored identifier (`.map_err(|_foo| ...`)
99
1010error: aborting due to previous error
1111
You can’t perform that action at this time.
0 commit comments