1 error: this expression borrows a reference that is immediately dereferenced by the compiler
2 --> $DIR/needless_borrow.rs:14: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:21: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:28:15
19 | ^^^ help: change this to: `&a`
21 error: this pattern creates a reference to a reference
22 --> $DIR/needless_borrow.rs:51:31
24 LL | let _ = v.iter().filter(|&ref a| a.is_empty());
25 | ^^^^^ help: change this to: `a`
27 error: aborting due to 4 previous errors