Move manual_mul_add into nursery

This commit is contained in:
flip1995 2019-10-26 19:56:36 +02:00
parent b3ecd48d2e
commit 1e1d45a005
No known key found for this signature in database
GPG Key ID: 693086869D506637
3 changed files with 6 additions and 5 deletions

View File

@ -1183,7 +1183,6 @@ pub fn register_plugins(store: &mut lint::LintStore, sess: &Session, conf: &Conf
LintId::of(&misc_early::UNNEEDED_FIELD_PATTERN),
LintId::of(&misc_early::UNNEEDED_WILDCARD_PATTERN),
LintId::of(&misc_early::ZERO_PREFIXED_LITERAL),
LintId::of(&mul_add::MANUAL_MUL_ADD),
LintId::of(&mut_reference::UNNECESSARY_MUT_PASSED),
LintId::of(&mutable_debug_assertion::DEBUG_ASSERT_WITH_MUT_CALL),
LintId::of(&mutex_atomic::MUTEX_ATOMIC),
@ -1527,7 +1526,6 @@ pub fn register_plugins(store: &mut lint::LintStore, sess: &Session, conf: &Conf
LintId::of(&methods::OR_FUN_CALL),
LintId::of(&methods::SINGLE_CHAR_PATTERN),
LintId::of(&misc::CMP_OWNED),
LintId::of(&mul_add::MANUAL_MUL_ADD),
LintId::of(&mutex_atomic::MUTEX_ATOMIC),
LintId::of(&redundant_clone::REDUNDANT_CLONE),
LintId::of(&slow_vector_initialization::SLOW_VECTOR_INITIALIZATION),
@ -1546,6 +1544,7 @@ pub fn register_plugins(store: &mut lint::LintStore, sess: &Session, conf: &Conf
LintId::of(&attrs::EMPTY_LINE_AFTER_OUTER_ATTR),
LintId::of(&fallible_impl_from::FALLIBLE_IMPL_FROM),
LintId::of(&missing_const_for_fn::MISSING_CONST_FOR_FN),
LintId::of(&mul_add::MANUAL_MUL_ADD),
LintId::of(&mutex_atomic::MUTEX_INTEGER),
LintId::of(&needless_borrow::NEEDLESS_BORROW),
LintId::of(&path_buf_push_overwrite::PATH_BUF_PUSH_OVERWRITE),

View File

@ -15,7 +15,9 @@ declare_clippy_lint! {
/// `c`. Depending on the target architecture, `mul_add()` may be more
/// performant.
///
/// **Known problems:** None.
/// **Known problems:** This lint can emit semantic incorrect suggestions.
/// For example, for `a * b * c + d` the suggestion `a * b.mul_add(c, d)`
/// is emitted, which is equivalent to `a * (b * c + d)`. (#4735)
///
/// **Example:**
///
@ -35,7 +37,7 @@ declare_clippy_lint! {
/// let foo = a.mul_add(b, c);
/// ```
pub MANUAL_MUL_ADD,
perf,
nursery,
"Using `a.mul_add(b, c)` for floating points has higher numerical precision than `a * b + c`"
}

View File

@ -961,7 +961,7 @@ pub const ALL_LINTS: [Lint; 332] = [
},
Lint {
name: "manual_mul_add",
group: "perf",
group: "nursery",
desc: "Using `a.mul_add(b, c)` for floating points has higher numerical precision than `a * b + c`",
deprecation: None,
module: "mul_add",