]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/neg_multiply.stderr
Rollup merge of #102454 - chenyukang:fix-102396-missing-parentheses, r=lcnr
[rust.git] / src / tools / clippy / tests / ui / neg_multiply.stderr
1 error: this multiplication by -1 can be written more succinctly
2   --> $DIR/neg_multiply.rs:29:5
3    |
4 LL |     x * -1;
5    |     ^^^^^^ help: consider using: `-x`
6    |
7    = note: `-D clippy::neg-multiply` implied by `-D warnings`
8
9 error: this multiplication by -1 can be written more succinctly
10   --> $DIR/neg_multiply.rs:31:5
11    |
12 LL |     -1 * x;
13    |     ^^^^^^ help: consider using: `-x`
14
15 error: this multiplication by -1 can be written more succinctly
16   --> $DIR/neg_multiply.rs:33:11
17    |
18 LL |     100 + x * -1;
19    |           ^^^^^^ help: consider using: `-x`
20
21 error: this multiplication by -1 can be written more succinctly
22   --> $DIR/neg_multiply.rs:35:5
23    |
24 LL |     (100 + x) * -1;
25    |     ^^^^^^^^^^^^^^ help: consider using: `-(100 + x)`
26
27 error: this multiplication by -1 can be written more succinctly
28   --> $DIR/neg_multiply.rs:37:5
29    |
30 LL |     -1 * 17;
31    |     ^^^^^^^ help: consider using: `-17`
32
33 error: this multiplication by -1 can be written more succinctly
34   --> $DIR/neg_multiply.rs:39:14
35    |
36 LL |     0xcafe | 0xff00 * -1;
37    |              ^^^^^^^^^^^ help: consider using: `-0xff00`
38
39 error: this multiplication by -1 can be written more succinctly
40   --> $DIR/neg_multiply.rs:41:5
41    |
42 LL |     3_usize as i32 * -1;
43    |     ^^^^^^^^^^^^^^^^^^^ help: consider using: `-(3_usize as i32)`
44
45 error: this multiplication by -1 can be written more succinctly
46   --> $DIR/neg_multiply.rs:42:5
47    |
48 LL |     (3_usize as i32) * -1;
49    |     ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `-(3_usize as i32)`
50
51 error: aborting due to 8 previous errors
52