1 error: this pattern creates a reference to a reference
2 --> $DIR/needless_borrow_pat.rs:59:14
7 = note: `-D clippy::needless-borrow` implied by `-D warnings`
8 = help: to override `-D warnings` add `#[allow(clippy::needless_borrow)]`
10 error: this pattern creates a reference to a reference
11 --> $DIR/needless_borrow_pat.rs:67:14
13 LL | Some(ref x) => *x,
21 error: this pattern creates a reference to a reference
22 --> $DIR/needless_borrow_pat.rs:74:14
35 error: this pattern creates a reference to a reference
36 --> $DIR/needless_borrow_pat.rs:85:14
38 LL | Some(ref x) => m1!(x),
39 | ^^^^^ help: try: `x`
41 error: this pattern creates a reference to a reference
42 --> $DIR/needless_borrow_pat.rs:91:15
44 LL | let _ = |&ref x: &&String| {
45 | ^^^^^ help: try: `x`
47 error: this pattern creates a reference to a reference
48 --> $DIR/needless_borrow_pat.rs:97:10
50 LL | let (ref y,) = (&x,);
55 LL ~ let (y,) = (&x,);
57 LL ~ let _: &String = y;
60 error: this pattern creates a reference to a reference
61 --> $DIR/needless_borrow_pat.rs:108:14
63 LL | Some(ref x) => x.0,
64 | ^^^^^ help: try: `x`
66 error: this pattern creates a reference to a reference
67 --> $DIR/needless_borrow_pat.rs:119:14
69 LL | E::A(ref x) | E::B(ref x) => *x,
74 LL | E::A(x) | E::B(x) => x,
77 error: this pattern creates a reference to a reference
78 --> $DIR/needless_borrow_pat.rs:126:21
80 LL | if let Some(ref x) = Some(&String::new());
81 | ^^^^^ help: try: `x`
83 error: this pattern creates a reference to a reference
84 --> $DIR/needless_borrow_pat.rs:135:12
86 LL | fn f2<'a>(&ref x: &&'a String) -> &'a String {
91 LL ~ fn f2<'a>(&x: &&'a String) -> &'a String {
93 LL | let _: &String = x;
97 error: this pattern creates a reference to a reference
98 --> $DIR/needless_borrow_pat.rs:143:11
100 LL | fn f(&ref x: &&String) {
101 | ^^^^^ help: try: `x`
103 error: this pattern creates a reference to a reference
104 --> $DIR/needless_borrow_pat.rs:152:11
106 LL | fn f(&ref x: &&String) {
111 LL ~ fn f(&x: &&String) {
113 LL ~ let _: &String = x;
116 error: aborting due to 12 previous errors