mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 11:07:42 +00:00
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
This commit is contained in:
commit
97f8caabf6
@ -21,7 +21,7 @@ declare_clippy_lint! {
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
pub INTEGER_DIVISION,
|
pub INTEGER_DIVISION,
|
||||||
pedantic,
|
restriction,
|
||||||
"integer division may cause loss of precision"
|
"integer division may cause loss of precision"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -591,6 +591,7 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>, conf: &Conf) {
|
|||||||
implicit_return::IMPLICIT_RETURN,
|
implicit_return::IMPLICIT_RETURN,
|
||||||
indexing_slicing::INDEXING_SLICING,
|
indexing_slicing::INDEXING_SLICING,
|
||||||
inherent_impl::MULTIPLE_INHERENT_IMPL,
|
inherent_impl::MULTIPLE_INHERENT_IMPL,
|
||||||
|
integer_division::INTEGER_DIVISION,
|
||||||
literal_representation::DECIMAL_LITERAL_REPRESENTATION,
|
literal_representation::DECIMAL_LITERAL_REPRESENTATION,
|
||||||
matches::WILDCARD_ENUM_MATCH_ARM,
|
matches::WILDCARD_ENUM_MATCH_ARM,
|
||||||
mem_forget::MEM_FORGET,
|
mem_forget::MEM_FORGET,
|
||||||
@ -626,7 +627,6 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>, conf: &Conf) {
|
|||||||
functions::TOO_MANY_LINES,
|
functions::TOO_MANY_LINES,
|
||||||
if_not_else::IF_NOT_ELSE,
|
if_not_else::IF_NOT_ELSE,
|
||||||
infinite_iter::MAYBE_INFINITE_ITER,
|
infinite_iter::MAYBE_INFINITE_ITER,
|
||||||
integer_division::INTEGER_DIVISION,
|
|
||||||
items_after_statements::ITEMS_AFTER_STATEMENTS,
|
items_after_statements::ITEMS_AFTER_STATEMENTS,
|
||||||
literal_representation::LARGE_DIGIT_GROUPS,
|
literal_representation::LARGE_DIGIT_GROUPS,
|
||||||
loops::EXPLICIT_INTO_ITER_LOOP,
|
loops::EXPLICIT_INTO_ITER_LOOP,
|
||||||
|
@ -758,7 +758,7 @@ pub const ALL_LINTS: [Lint; 305] = [
|
|||||||
},
|
},
|
||||||
Lint {
|
Lint {
|
||||||
name: "integer_division",
|
name: "integer_division",
|
||||||
group: "pedantic",
|
group: "restriction",
|
||||||
desc: "integer division may cause loss of precision",
|
desc: "integer division may cause loss of precision",
|
||||||
deprecation: None,
|
deprecation: None,
|
||||||
module: "integer_division",
|
module: "integer_division",
|
||||||
|
Loading…
Reference in New Issue
Block a user