Skip to content

Commit

Permalink
Auto merge of #5555 - flip1995:pedantic_match_on_vec_items, r=phansch
Browse files Browse the repository at this point in the history
Move match_on_vec_items to pedantic

Addresses #5551 (comment)

Fixes #5553

changelog: Move [`match_on_vec_items`] to pedantic

r? @phansch
  • Loading branch information
bors committed May 2, 2020
2 parents e3b8c41 + 10e3f9b commit 991efa6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions clippy_lints/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1138,6 +1138,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
LintId::of(&loops::EXPLICIT_INTO_ITER_LOOP),
LintId::of(&loops::EXPLICIT_ITER_LOOP),
LintId::of(&macro_use::MACRO_USE_IMPORTS),
LintId::of(&match_on_vec_items::MATCH_ON_VEC_ITEMS),
LintId::of(&matches::MATCH_BOOL),
LintId::of(&matches::SINGLE_MATCH_ELSE),
LintId::of(&methods::FILTER_MAP),
Expand Down Expand Up @@ -1283,7 +1284,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
LintId::of(&map_clone::MAP_CLONE),
LintId::of(&map_unit_fn::OPTION_MAP_UNIT_FN),
LintId::of(&map_unit_fn::RESULT_MAP_UNIT_FN),
LintId::of(&match_on_vec_items::MATCH_ON_VEC_ITEMS),
LintId::of(&matches::INFALLIBLE_DESTRUCTURING_MATCH),
LintId::of(&matches::MATCH_AS_REF),
LintId::of(&matches::MATCH_OVERLAPPING_ARM),
Expand Down Expand Up @@ -1647,7 +1647,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
LintId::of(&loops::NEVER_LOOP),
LintId::of(&loops::REVERSE_RANGE_LOOP),
LintId::of(&loops::WHILE_IMMUTABLE_CONDITION),
LintId::of(&match_on_vec_items::MATCH_ON_VEC_ITEMS),
LintId::of(&mem_discriminant::MEM_DISCRIMINANT_NON_ENUM),
LintId::of(&mem_replace::MEM_REPLACE_WITH_UNINIT),
LintId::of(&methods::CLONE_DOUBLE_REF),
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/match_on_vec_items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ declare_clippy_lint! {
/// }
/// ```
pub MATCH_ON_VEC_ITEMS,
correctness,
pedantic,
"matching on vector elements can panic"
}

Expand Down
2 changes: 1 addition & 1 deletion src/lintlist/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1146,7 +1146,7 @@ pub static ref ALL_LINTS: Vec<Lint> = vec![
},
Lint {
name: "match_on_vec_items",
group: "correctness",
group: "pedantic",
desc: "matching on vector elements can panic",
deprecation: None,
module: "match_on_vec_items",
Expand Down

0 comments on commit 991efa6

Please sign in to comment.