]> git.lizzy.rs Git - rust.git/blob - tests/ui/op_ref.stderr
Fix `#[expect]` for `clippy::ptr_arg`
[rust.git] / tests / ui / op_ref.stderr
1 error: needlessly taken reference of both operands
2   --> $DIR/op_ref.rs:11:15
3    |
4 LL |     let foo = &5 - &6;
5    |               ^^^^^^^
6    |
7    = note: `-D clippy::op-ref` implied by `-D warnings`
8 help: use the values directly
9    |
10 LL |     let foo = 5 - 6;
11    |               ~   ~
12
13 error: taken reference of right operand
14   --> $DIR/op_ref.rs:56:13
15    |
16 LL |     let z = x & &y;
17    |             ^^^^--
18    |                 |
19    |                 help: use the right value directly: `y`
20
21 error: taken reference of right operand
22   --> $DIR/op_ref.rs:89:17
23    |
24 LL |         let _ = one * &self;
25    |                 ^^^^^^-----
26    |                       |
27    |                       help: use the right value directly: `self`
28
29 error: taken reference of right operand
30   --> $DIR/op_ref.rs:90:17
31    |
32 LL |         let _ = two + &three;
33    |                 ^^^^^^------
34    |                       |
35    |                       help: use the right value directly: `three`
36
37 error: aborting due to 4 previous errors
38