rust-clippy/tests/ui/mul_add.stderr
Ethan Lam 327c91f8c7 Addresses Issue #4001
Fixed typo

Fixes lint name and uses appropriate linting suggestion

changed lint help message

Added autofixable test

Added Autofixable Test

Removed Broken Autofixable File

updated lints

Generated Autofixable/Nonfixable Test Cases

Changed Suggestion Applicability

Updated Lint Count
2019-10-08 08:46:29 -05:00

34 lines
1.3 KiB
Text

error: consider using mul_add() for better numerical precision
--> $DIR/mul_add.rs:10:17
|
LL | let test1 = (a * b + c) * (c + a * b) + (c + (a * b) + c);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(a * b + c).mul_add((c + a * b), (c + (a * b) + c))`
|
= note: `-D clippy::manual-mul-add` implied by `-D warnings`
error: consider using mul_add() for better numerical precision
--> $DIR/mul_add.rs:10:17
|
LL | let test1 = (a * b + c) * (c + a * b) + (c + (a * b) + c);
| ^^^^^^^^^^^ help: try: `a.mul_add(b, c)`
error: consider using mul_add() for better numerical precision
--> $DIR/mul_add.rs:10:31
|
LL | let test1 = (a * b + c) * (c + a * b) + (c + (a * b) + c);
| ^^^^^^^^^^^ help: try: `a.mul_add(b, c)`
error: consider using mul_add() for better numerical precision
--> $DIR/mul_add.rs:10:46
|
LL | let test1 = (a * b + c) * (c + a * b) + (c + (a * b) + c);
| ^^^^^^^^^^^ help: try: `a.mul_add(b, c)`
error: consider using mul_add() for better numerical precision
--> $DIR/mul_add.rs:11:17
|
LL | let test2 = 1234.567 * 45.67834 + 0.0004;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `1234.567.mul_add(45.67834, 0.0004)`
error: aborting due to 5 previous errors