]>
Commit | Line | Data |
---|---|---|
17df50a5 XL |
1 | error: this pattern creates a reference to a reference |
2 | --> $DIR/needless_borrow_pat.rs:60:14 | |
3 | | | |
4 | LL | Some(ref x) => x, | |
5 | | ^^^^^ help: try this: `x` | |
6 | | | |
7 | = note: `-D clippy::needless-borrow` implied by `-D warnings` | |
8 | ||
9 | error: this pattern creates a reference to a reference | |
10 | --> $DIR/needless_borrow_pat.rs:66:14 | |
11 | | | |
12 | LL | Some(ref x) => *x, | |
13 | | ^^^^^ | |
14 | | | |
15 | help: try this | |
16 | | | |
17 | LL | Some(x) => x, | |
94222f64 | 18 | | ~ ~ |
17df50a5 XL |
19 | |
20 | error: this pattern creates a reference to a reference | |
21 | --> $DIR/needless_borrow_pat.rs:72:14 | |
22 | | | |
23 | LL | Some(ref x) => { | |
24 | | ^^^^^ | |
25 | | | |
26 | help: try this | |
27 | | | |
94222f64 | 28 | LL ~ Some(x) => { |
17df50a5 | 29 | LL | f1(x); |
94222f64 | 30 | LL ~ f1(x); |
17df50a5 XL |
31 | | |
32 | ||
33 | error: this pattern creates a reference to a reference | |
34 | --> $DIR/needless_borrow_pat.rs:82:14 | |
35 | | | |
36 | LL | Some(ref x) => m1!(x), | |
37 | | ^^^^^ help: try this: `x` | |
38 | ||
39 | error: this pattern creates a reference to a reference | |
40 | --> $DIR/needless_borrow_pat.rs:87:15 | |
41 | | | |
42 | LL | let _ = |&ref x: &&String| { | |
43 | | ^^^^^ help: try this: `x` | |
44 | ||
45 | error: this pattern creates a reference to a reference | |
46 | --> $DIR/needless_borrow_pat.rs:92:10 | |
47 | | | |
48 | LL | let (ref y,) = (&x,); | |
49 | | ^^^^^ | |
50 | | | |
51 | help: try this | |
52 | | | |
94222f64 XL |
53 | LL ~ let (y,) = (&x,); |
54 | LL ~ let _: &String = y; | |
17df50a5 XL |
55 | | |
56 | ||
57 | error: this pattern creates a reference to a reference | |
58 | --> $DIR/needless_borrow_pat.rs:102:14 | |
59 | | | |
60 | LL | Some(ref x) => x.0, | |
61 | | ^^^^^ help: try this: `x` | |
62 | ||
63 | error: this pattern creates a reference to a reference | |
64 | --> $DIR/needless_borrow_pat.rs:112:14 | |
65 | | | |
66 | LL | E::A(ref x) | E::B(ref x) => *x, | |
67 | | ^^^^^ ^^^^^ | |
68 | | | |
69 | help: try this | |
70 | | | |
71 | LL | E::A(x) | E::B(x) => x, | |
94222f64 | 72 | | ~ ~ ~ |
17df50a5 XL |
73 | |
74 | error: this pattern creates a reference to a reference | |
75 | --> $DIR/needless_borrow_pat.rs:118:21 | |
76 | | | |
77 | LL | if let Some(ref x) = Some(&String::new()); | |
78 | | ^^^^^ help: try this: `x` | |
79 | ||
80 | error: this pattern creates a reference to a reference | |
81 | --> $DIR/needless_borrow_pat.rs:126:12 | |
82 | | | |
83 | LL | fn f2<'a>(&ref x: &&'a String) -> &'a String { | |
84 | | ^^^^^ | |
85 | | | |
86 | help: try this | |
87 | | | |
94222f64 | 88 | LL ~ fn f2<'a>(&x: &&'a String) -> &'a String { |
17df50a5 | 89 | LL | let _: &String = x; |
94222f64 | 90 | LL ~ x |
17df50a5 XL |
91 | | |
92 | ||
93 | error: this pattern creates a reference to a reference | |
94 | --> $DIR/needless_borrow_pat.rs:133:11 | |
95 | | | |
96 | LL | fn f(&ref x: &&String) { | |
97 | | ^^^^^ help: try this: `x` | |
98 | ||
99 | error: this pattern creates a reference to a reference | |
100 | --> $DIR/needless_borrow_pat.rs:141:11 | |
101 | | | |
102 | LL | fn f(&ref x: &&String) { | |
103 | | ^^^^^ | |
104 | | | |
105 | help: try this | |
106 | | | |
94222f64 XL |
107 | LL ~ fn f(&x: &&String) { |
108 | LL ~ let _: &String = x; | |
17df50a5 XL |
109 | | |
110 | ||
111 | error: aborting due to 12 previous errors | |
112 |