Skip to content

Commit e6a836e

Browse files
committed
Move UNNECESSARY_UNWRAP to complexity and PANICKING_UNWRAP to correctness
1 parent c8e5352 commit e6a836e

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

clippy_lints/src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -894,6 +894,8 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>, conf: &Conf) {
894894
unsafe_removed_from_name::UNSAFE_REMOVED_FROM_NAME,
895895
unused_io_amount::UNUSED_IO_AMOUNT,
896896
unused_label::UNUSED_LABEL,
897+
unwrap::PANICKING_UNWRAP,
898+
unwrap::UNNECESSARY_UNWRAP,
897899
vec::USELESS_VEC,
898900
write::PRINTLN_EMPTY_STRING,
899901
write::PRINT_LITERAL,
@@ -1060,6 +1062,7 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>, conf: &Conf) {
10601062
types::UNNECESSARY_CAST,
10611063
types::VEC_BOX,
10621064
unused_label::UNUSED_LABEL,
1065+
unwrap::UNNECESSARY_UNWRAP,
10631066
zero_div_zero::ZERO_DIVIDED_BY_ZERO,
10641067
]);
10651068

@@ -1121,6 +1124,7 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>, conf: &Conf) {
11211124
types::UNIT_CMP,
11221125
unicode::ZERO_WIDTH_SPACE,
11231126
unused_io_amount::UNUSED_IO_AMOUNT,
1127+
unwrap::PANICKING_UNWRAP,
11241128
]);
11251129

11261130
reg.register_lint_group("clippy::perf", Some("clippy_perf"), vec![
@@ -1157,8 +1161,6 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>, conf: &Conf) {
11571161
needless_borrow::NEEDLESS_BORROW,
11581162
path_buf_push_overwrite::PATH_BUF_PUSH_OVERWRITE,
11591163
redundant_clone::REDUNDANT_CLONE,
1160-
unwrap::PANICKING_UNWRAP,
1161-
unwrap::UNNECESSARY_UNWRAP,
11621164
]);
11631165
}
11641166

clippy_lints/src/unwrap.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ declare_clippy_lint! {
3131
/// }
3232
/// ```
3333
pub UNNECESSARY_UNWRAP,
34-
nursery,
34+
complexity,
3535
"checks for calls of unwrap[_err]() that cannot fail"
3636
}
3737

@@ -52,7 +52,7 @@ declare_clippy_lint! {
5252
///
5353
/// This code will always panic. The if condition should probably be inverted.
5454
pub PANICKING_UNWRAP,
55-
nursery,
55+
correctness,
5656
"checks for calls of unwrap[_err]() that will always fail"
5757
}
5858

src/lintlist/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1381,7 +1381,7 @@ pub const ALL_LINTS: [Lint; 309] = [
13811381
},
13821382
Lint {
13831383
name: "panicking_unwrap",
1384-
group: "nursery",
1384+
group: "correctness",
13851385
desc: "checks for calls of unwrap[_err]() that will always fail",
13861386
deprecation: None,
13871387
module: "unwrap",
@@ -1927,7 +1927,7 @@ pub const ALL_LINTS: [Lint; 309] = [
19271927
},
19281928
Lint {
19291929
name: "unnecessary_unwrap",
1930-
group: "nursery",
1930+
group: "complexity",
19311931
desc: "checks for calls of unwrap[_err]() that cannot fail",
19321932
deprecation: None,
19331933
module: "unwrap",

0 commit comments

Comments
 (0)