1 error: this expression borrows a reference (`&i32`) that is immediately dereferenced by the compiler
2 --> $DIR/needless_borrow.rs:9:15
4 LL | let _ = x(&&a); // warn
5 | ^^^ help: change this to: `&a`
7 = note: `-D clippy::needless-borrow` implied by `-D warnings`
9 error: this expression borrows a reference (`&mut i32`) that is immediately dereferenced by the compiler
10 --> $DIR/needless_borrow.rs:13:13
12 LL | mut_ref(&mut &mut b); // warn
13 | ^^^^^^^^^^^ help: change this to: `&mut b`
15 error: this expression borrows a reference (`&i32`) that is immediately dereferenced by the compiler
16 --> $DIR/needless_borrow.rs:25:13
19 | ^^^ help: change this to: `&a`
21 error: this expression borrows a reference (`&i32`) that is immediately dereferenced by the compiler
22 --> $DIR/needless_borrow.rs:27:15
25 | ^^^ help: change this to: `&a`
27 error: this expression borrows a reference (`&i32`) that is immediately dereferenced by the compiler
28 --> $DIR/needless_borrow.rs:33:27
31 | ^^^^^^ help: change this to: `ref_a`
33 error: this expression borrows a reference (`&i32`) that is immediately dereferenced by the compiler
34 --> $DIR/needless_borrow.rs:40:15
37 | ^^^^ help: change this to: `&a`
39 error: this expression borrows a reference (`&i32`) that is immediately dereferenced by the compiler
40 --> $DIR/needless_borrow.rs:41:15
42 LL | let _ = x(&mut &&a);
43 | ^^^^^^^^ help: change this to: `&a`
45 error: this expression borrows a reference (`&mut i32`) that is immediately dereferenced by the compiler
46 --> $DIR/needless_borrow.rs:42:15
48 LL | let _ = x(&&&mut b);
49 | ^^^^^^^^ help: change this to: `&mut b`
51 error: this expression borrows a reference (`&i32`) that is immediately dereferenced by the compiler
52 --> $DIR/needless_borrow.rs:43:15
54 LL | let _ = x(&&ref_a);
55 | ^^^^^^^ help: change this to: `ref_a`
57 error: this expression borrows a reference (`&mut i32`) that is immediately dereferenced by the compiler
58 --> $DIR/needless_borrow.rs:46:11
61 | ^^ help: change this to: `b`
63 error: aborting due to 10 previous errors