fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.1 KiB39 linesraw
1error: needlessly taken reference of both operands
2  --> $DIR/op_ref.rs:11:15
3   |
4LL |     let foo = &5 - &6;
5   |               ^^^^^^^
6   |
7   = note: `-D clippy::op-ref` implied by `-D warnings`
8   = help: to override `-D warnings` add `#[allow(clippy::op_ref)]`
9help: use the values directly
10   |
11LL |     let foo = 5 - 6;
12   |               ~   ~
13
14error: taken reference of right operand
15  --> $DIR/op_ref.rs:58:13
16   |
17LL |     let z = x & &y;
18   |             ^^^^--
19   |                 |
20   |                 help: use the right value directly: `y`
21
22error: taken reference of right operand
23  --> $DIR/op_ref.rs:92:17
24   |
25LL |         let _ = one * &self;
26   |                 ^^^^^^-----
27   |                       |
28   |                       help: use the right value directly: `self`
29
30error: taken reference of right operand
31  --> $DIR/op_ref.rs:94:17
32   |
33LL |         let _ = two + &three;
34   |                 ^^^^^^------
35   |                       |
36   |                       help: use the right value directly: `three`
37
38error: aborting due to 4 previous errors
39