Skip to content

Commit 97f8caa

Browse files
committed
Auto merge of #4210 - dtolnay:division, r=flip1995
Downgrade integer_division to restriction I believe that this lint falls outside of the scope of opinionated pedantism of the other pedantic lints. changelog: Downgrade integer_division lint from pedantic to restriction
2 parents 84cfb71 + f88a387 commit 97f8caa

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Diff for: clippy_lints/src/integer_division.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ declare_clippy_lint! {
2121
/// }
2222
/// ```
2323
pub INTEGER_DIVISION,
24-
pedantic,
24+
restriction,
2525
"integer division may cause loss of precision"
2626
}
2727

Diff for: clippy_lints/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,7 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>, conf: &Conf) {
591591
implicit_return::IMPLICIT_RETURN,
592592
indexing_slicing::INDEXING_SLICING,
593593
inherent_impl::MULTIPLE_INHERENT_IMPL,
594+
integer_division::INTEGER_DIVISION,
594595
literal_representation::DECIMAL_LITERAL_REPRESENTATION,
595596
matches::WILDCARD_ENUM_MATCH_ARM,
596597
mem_forget::MEM_FORGET,
@@ -626,7 +627,6 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>, conf: &Conf) {
626627
functions::TOO_MANY_LINES,
627628
if_not_else::IF_NOT_ELSE,
628629
infinite_iter::MAYBE_INFINITE_ITER,
629-
integer_division::INTEGER_DIVISION,
630630
items_after_statements::ITEMS_AFTER_STATEMENTS,
631631
literal_representation::LARGE_DIGIT_GROUPS,
632632
loops::EXPLICIT_INTO_ITER_LOOP,

Diff for: src/lintlist/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ pub const ALL_LINTS: [Lint; 305] = [
758758
},
759759
Lint {
760760
name: "integer_division",
761-
group: "pedantic",
761+
group: "restriction",
762762
desc: "integer division may cause loss of precision",
763763
deprecation: None,
764764
module: "integer_division",

0 commit comments

Comments
 (0)