1 error: this pattern creates a reference to a reference
2 --> $DIR/needless_borrow_pat.rs:60: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:66:14
12 LL | Some(ref x) => *x,
20 error: this pattern creates a reference to a reference
21 --> $DIR/needless_borrow_pat.rs:72:14
33 error: this pattern creates a reference to a reference
34 --> $DIR/needless_borrow_pat.rs:82: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:87: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:92: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:102: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:112: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:118: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:126: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:133: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:141: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