INDEXING_SLICING should probably be a restriction lint.

This commit is contained in:
Georg Brandl
2016-08-06 08:56:28 +02:00
parent 74c7880597
commit bc2ecc9623
2 changed files with 2 additions and 3 deletions

View File

@@ -43,9 +43,8 @@ declare_lint! {
/// x[2]; /// x[2];
/// &x[0..2]; /// &x[0..2];
/// ``` /// ```
declare_lint! { declare_restriction_lint! {
pub INDEXING_SLICING, pub INDEXING_SLICING,
Allow,
"indexing/slicing usage" "indexing/slicing usage"
} }

View File

@@ -260,11 +260,11 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry) {
reg.register_lint_group("clippy_restrictions", vec![ reg.register_lint_group("clippy_restrictions", vec![
arithmetic::FLOAT_ARITHMETIC, arithmetic::FLOAT_ARITHMETIC,
arithmetic::INTEGER_ARITHMETIC, arithmetic::INTEGER_ARITHMETIC,
array_indexing::INDEXING_SLICING,
assign_ops::ASSIGN_OPS, assign_ops::ASSIGN_OPS,
]); ]);
reg.register_lint_group("clippy_pedantic", vec![ reg.register_lint_group("clippy_pedantic", vec![
array_indexing::INDEXING_SLICING,
booleans::NONMINIMAL_BOOL, booleans::NONMINIMAL_BOOL,
enum_glob_use::ENUM_GLOB_USE, enum_glob_use::ENUM_GLOB_USE,
enum_variants::STUTTER, enum_variants::STUTTER,