1 error: this pattern creates a reference to a reference
2 --> $DIR/needless_borrow_pat.rs:59:14
5 | ^^^^^ help: try this: `x`
7 = note: `-D clippy::needless-borrow` implied by `-D warnings`
9 error: this pattern creates a reference to a reference
10 --> $DIR/needless_borrow_pat.rs:65:14
12 LL | Some(ref x) => *x,
20 error: this pattern creates a reference to a reference
21 --> $DIR/needless_borrow_pat.rs:71:14
33 error: this pattern creates a reference to a reference
34 --> $DIR/needless_borrow_pat.rs:81:14
36 LL | Some(ref x) => m1!(x),
37 | ^^^^^ help: try this: `x`
39 error: this pattern creates a reference to a reference
40 --> $DIR/needless_borrow_pat.rs:86:15
42 LL | let _ = |&ref x: &&String| {
43 | ^^^^^ help: try this: `x`
45 error: this pattern creates a reference to a reference
46 --> $DIR/needless_borrow_pat.rs:91:10
48 LL | let (ref y,) = (&x,);
53 LL ~ let (y,) = (&x,);
54 LL ~ let _: &String = y;
57 error: this pattern creates a reference to a reference
58 --> $DIR/needless_borrow_pat.rs:101:14
60 LL | Some(ref x) => x.0,
61 | ^^^^^ help: try this: `x`
63 error: this pattern creates a reference to a reference
64 --> $DIR/needless_borrow_pat.rs:111:14
66 LL | E::A(ref x) | E::B(ref x) => *x,
71 LL | E::A(x) | E::B(x) => x,
74 error: this pattern creates a reference to a reference
75 --> $DIR/needless_borrow_pat.rs:117:21
77 LL | if let Some(ref x) = Some(&String::new());
78 | ^^^^^ help: try this: `x`
80 error: this pattern creates a reference to a reference
81 --> $DIR/needless_borrow_pat.rs:125:12
83 LL | fn f2<'a>(&ref x: &&'a String) -> &'a String {
88 LL ~ fn f2<'a>(&x: &&'a String) -> &'a String {
89 LL | let _: &String = x;
93 error: this pattern creates a reference to a reference
94 --> $DIR/needless_borrow_pat.rs:132:11
96 LL | fn f(&ref x: &&String) {
97 | ^^^^^ help: try this: `x`
99 error: this pattern creates a reference to a reference
100 --> $DIR/needless_borrow_pat.rs:140:11
102 LL | fn f(&ref x: &&String) {
107 LL ~ fn f(&x: &&String) {
108 LL ~ let _: &String = x;
111 error: aborting due to 12 previous errors