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