Skip to content

Commit

Permalink
Move manual_mul_add into nursery
Browse files Browse the repository at this point in the history
  • Loading branch information
flip1995 committed Oct 26, 2019
1 parent b3ecd48 commit 1e1d45a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 1 addition & 2 deletions clippy_lints/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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),
Expand All @@ -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),
Expand Down
6 changes: 4 additions & 2 deletions clippy_lints/src/mul_add.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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:**
///
Expand All @@ -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`"
}

Expand Down
2 changes: 1 addition & 1 deletion src/lintlist/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 1e1d45a

Please sign in to comment.