Skip to content

Commit

Permalink
Move UNNECESSARY_UNWRAP to complexity and PANICKING_UNWRAP to correct…
Browse files Browse the repository at this point in the history
…ness
  • Loading branch information
flip1995 committed Jul 30, 2019
1 parent dc69a5c commit 5dc3e3b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions clippy_lints/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -891,6 +891,8 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>, conf: &Conf) {
unsafe_removed_from_name::UNSAFE_REMOVED_FROM_NAME,
unused_io_amount::UNUSED_IO_AMOUNT,
unused_label::UNUSED_LABEL,
unwrap::PANICKING_UNWRAP,
unwrap::UNNECESSARY_UNWRAP,
vec::USELESS_VEC,
write::PRINTLN_EMPTY_STRING,
write::PRINT_LITERAL,
Expand Down Expand Up @@ -1056,6 +1058,7 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>, conf: &Conf) {
types::UNNECESSARY_CAST,
types::VEC_BOX,
unused_label::UNUSED_LABEL,
unwrap::UNNECESSARY_UNWRAP,
zero_div_zero::ZERO_DIVIDED_BY_ZERO,
]);

Expand Down Expand Up @@ -1117,6 +1120,7 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>, conf: &Conf) {
types::UNIT_CMP,
unicode::ZERO_WIDTH_SPACE,
unused_io_amount::UNUSED_IO_AMOUNT,
unwrap::PANICKING_UNWRAP,
]);

reg.register_lint_group("clippy::perf", Some("clippy_perf"), vec![
Expand Down Expand Up @@ -1153,8 +1157,6 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>, conf: &Conf) {
needless_borrow::NEEDLESS_BORROW,
path_buf_push_overwrite::PATH_BUF_PUSH_OVERWRITE,
redundant_clone::REDUNDANT_CLONE,
unwrap::PANICKING_UNWRAP,
unwrap::UNNECESSARY_UNWRAP,
]);
}

Expand Down
4 changes: 2 additions & 2 deletions clippy_lints/src/unwrap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ declare_clippy_lint! {
/// }
/// ```
pub UNNECESSARY_UNWRAP,
nursery,
complexity,
"checks for calls of unwrap[_err]() that cannot fail"
}

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

Expand Down
4 changes: 2 additions & 2 deletions src/lintlist/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1381,7 +1381,7 @@ pub const ALL_LINTS: [Lint; 308] = [
},
Lint {
name: "panicking_unwrap",
group: "nursery",
group: "correctness",
desc: "checks for calls of unwrap[_err]() that will always fail",
deprecation: None,
module: "unwrap",
Expand Down Expand Up @@ -1920,7 +1920,7 @@ pub const ALL_LINTS: [Lint; 308] = [
},
Lint {
name: "unnecessary_unwrap",
group: "nursery",
group: "complexity",
desc: "checks for calls of unwrap[_err]() that cannot fail",
deprecation: None,
module: "unwrap",
Expand Down

0 comments on commit 5dc3e3b

Please sign in to comment.