1 error: this expression borrows a reference that is immediately dereferenced by the compiler
2 --> $DIR/needless_borrow.rs:13:15
5 | ^^^ help: change this to: `&a`
7 = note: `-D clippy::needless-borrow` implied by `-D warnings`
9 error: this pattern creates a reference to a reference
10 --> $DIR/needless_borrow.rs:20:17
12 LL | if let Some(ref cake) = Some(&5) {}
13 | ^^^^^^^^ help: change this to: `cake`
15 error: this expression borrows a reference that is immediately dereferenced by the compiler
16 --> $DIR/needless_borrow.rs:27:15
19 | ^^^ help: change this to: `&a`
21 error: this pattern takes a reference on something that is being de-referenced
22 --> $DIR/needless_borrow.rs:49:34
24 LL | let _ = v.iter_mut().filter(|&ref a| a.is_empty());
25 | ^^^^^^ help: try removing the `&ref` part and just keep: `a`
27 = note: `-D clippy::needless-borrowed-reference` implied by `-D warnings`
29 error: this pattern takes a reference on something that is being de-referenced
30 --> $DIR/needless_borrow.rs:50:30
32 LL | let _ = v.iter().filter(|&ref a| a.is_empty());
33 | ^^^^^^ help: try removing the `&ref` part and just keep: `a`
35 error: this pattern creates a reference to a reference
36 --> $DIR/needless_borrow.rs:50:31
38 LL | let _ = v.iter().filter(|&ref a| a.is_empty());
39 | ^^^^^ help: change this to: `a`
41 error: aborting due to 6 previous errors