Skip to content

Commit d719b48

Browse files
RickyRicky
Ricky
authored and
Ricky
committed
Move map_err_ignore from style to pedantic
1 parent 4f1c4a9 commit d719b48

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

clippy_lints/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,6 +1179,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
11791179
LintId::of(&loops::EXPLICIT_INTO_ITER_LOOP),
11801180
LintId::of(&loops::EXPLICIT_ITER_LOOP),
11811181
LintId::of(&macro_use::MACRO_USE_IMPORTS),
1182+
LintId::of(&map_err_ignore::MAP_ERR_IGNORE),
11821183
LintId::of(&match_on_vec_items::MATCH_ON_VEC_ITEMS),
11831184
LintId::of(&matches::MATCH_BOOL),
11841185
LintId::of(&matches::MATCH_WILDCARD_FOR_SINGLE_VARIANTS),
@@ -1330,7 +1331,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
13301331
LintId::of(&manual_async_fn::MANUAL_ASYNC_FN),
13311332
LintId::of(&manual_non_exhaustive::MANUAL_NON_EXHAUSTIVE),
13321333
LintId::of(&map_clone::MAP_CLONE),
1333-
LintId::of(&map_err_ignore::MAP_ERR_IGNORE),
13341334
LintId::of(&map_identity::MAP_IDENTITY),
13351335
LintId::of(&map_unit_fn::OPTION_MAP_UNIT_FN),
13361336
LintId::of(&map_unit_fn::RESULT_MAP_UNIT_FN),
@@ -1538,7 +1538,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
15381538
LintId::of(&manual_async_fn::MANUAL_ASYNC_FN),
15391539
LintId::of(&manual_non_exhaustive::MANUAL_NON_EXHAUSTIVE),
15401540
LintId::of(&map_clone::MAP_CLONE),
1541-
LintId::of(&map_err_ignore::MAP_ERR_IGNORE),
15421541
LintId::of(&matches::INFALLIBLE_DESTRUCTURING_MATCH),
15431542
LintId::of(&matches::MATCH_LIKE_MATCHES_MACRO),
15441543
LintId::of(&matches::MATCH_OVERLAPPING_ARM),

clippy_lints/src/map_err_ignore.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ declare_clippy_lint! {
9999
/// }
100100
/// ```
101101
pub MAP_ERR_IGNORE,
102-
style,
102+
pedantic,
103103
"`map_err` should not ignore the original error"
104104
}
105105

src/lintlist/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1167,7 +1167,7 @@ pub static ref ALL_LINTS: Vec<Lint> = vec![
11671167
},
11681168
Lint {
11691169
name: "map_err_ignore",
1170-
group: "style",
1170+
group: "pedantic",
11711171
desc: "`map_err` should not ignore the original error",
11721172
deprecation: None,
11731173
module: "map_err_ignore",

tests/ui/map_err.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![warn(clippy::map_err_ignore)]
12
use std::convert::TryFrom;
23
use std::error::Error;
34
use std::fmt;

tests/ui/map_err.stderr

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

0 commit comments

Comments
 (0)