Skip to content

Commit bc2ecc9

Browse files
committed
INDEXING_SLICING should probably be a restriction lint.
1 parent 74c7880 commit bc2ecc9

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

clippy_lints/src/array_indexing.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,8 @@ declare_lint! {
4343
/// x[2];
4444
/// &x[0..2];
4545
/// ```
46-
declare_lint! {
46+
declare_restriction_lint! {
4747
pub INDEXING_SLICING,
48-
Allow,
4948
"indexing/slicing usage"
5049
}
5150

clippy_lints/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,11 +260,11 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry) {
260260
reg.register_lint_group("clippy_restrictions", vec![
261261
arithmetic::FLOAT_ARITHMETIC,
262262
arithmetic::INTEGER_ARITHMETIC,
263+
array_indexing::INDEXING_SLICING,
263264
assign_ops::ASSIGN_OPS,
264265
]);
265266

266267
reg.register_lint_group("clippy_pedantic", vec![
267-
array_indexing::INDEXING_SLICING,
268268
booleans::NONMINIMAL_BOOL,
269269
enum_glob_use::ENUM_GLOB_USE,
270270
enum_variants::STUTTER,

0 commit comments

Comments
 (0)