]> git.lizzy.rs Git - rust.git/blob - tests/ui/parser/label-after-block-like.stderr
Auto merge of #107478 - compiler-errors:anon-enum-tys-are-ambiguous, r=estebank
[rust.git] / tests / ui / parser / label-after-block-like.stderr
1 error: labeled expression must be followed by `:`
2   --> $DIR/label-after-block-like.rs:2:20
3    |
4 LL |     if let () = () 'a {}
5    |                    ---^^
6    |                    | |
7    |                    | help: add `:` after the label
8    |                    the label
9    |
10    = note: labels are used before loops and blocks, allowing e.g., `break 'label` to them
11
12 error: expected `{`, found `'a`
13   --> $DIR/label-after-block-like.rs:2:20
14    |
15 LL |     if let () = () 'a {}
16    |                    ^^ expected `{`
17    |
18 note: the `if` expression is missing a block after this condition
19   --> $DIR/label-after-block-like.rs:2:8
20    |
21 LL |     if let () = () 'a {}
22    |        ^^^^^^^^^^^
23 help: try placing this code inside a block
24    |
25 LL |     if let () = () { 'a {} }
26    |                    +       +
27
28 error: labeled expression must be followed by `:`
29   --> $DIR/label-after-block-like.rs:8:13
30    |
31 LL |     if true 'a {}
32    |             ---^^
33    |             | |
34    |             | help: add `:` after the label
35    |             the label
36    |
37    = note: labels are used before loops and blocks, allowing e.g., `break 'label` to them
38
39 error: expected `{`, found `'a`
40   --> $DIR/label-after-block-like.rs:8:13
41    |
42 LL |     if true 'a {}
43    |             ^^ expected `{`
44    |
45 note: the `if` expression is missing a block after this condition
46   --> $DIR/label-after-block-like.rs:8:8
47    |
48 LL |     if true 'a {}
49    |        ^^^^
50 help: try placing this code inside a block
51    |
52 LL |     if true { 'a {} }
53    |             +       +
54
55 error: labeled expression must be followed by `:`
56   --> $DIR/label-after-block-like.rs:14:10
57    |
58 LL |     loop 'a {}
59    |          ---^^
60    |          | |
61    |          | help: add `:` after the label
62    |          the label
63    |
64    = note: labels are used before loops and blocks, allowing e.g., `break 'label` to them
65
66 error: expected `{`, found `'a`
67   --> $DIR/label-after-block-like.rs:14:10
68    |
69 LL |     loop 'a {}
70    |     ---- ^^ expected `{`
71    |     |
72    |     while parsing this `loop` expression
73    |
74 help: try placing this code inside a block
75    |
76 LL |     loop { 'a {} }
77    |          +       +
78
79 error: labeled expression must be followed by `:`
80   --> $DIR/label-after-block-like.rs:20:16
81    |
82 LL |     while true 'a {}
83    |                ---^^
84    |                | |
85    |                | help: add `:` after the label
86    |                the label
87    |
88    = note: labels are used before loops and blocks, allowing e.g., `break 'label` to them
89
90 error: expected `{`, found `'a`
91   --> $DIR/label-after-block-like.rs:20:16
92    |
93 LL |     while true 'a {}
94    |     ----- ---- ^^ expected `{`
95    |     |     |
96    |     |     this `while` condition successfully parsed
97    |     while parsing the body of this `while` expression
98    |
99 help: try placing this code inside a block
100    |
101 LL |     while true { 'a {} }
102    |                +       +
103
104 error: labeled expression must be followed by `:`
105   --> $DIR/label-after-block-like.rs:26:23
106    |
107 LL |     while let () = () 'a {}
108    |                       ---^^
109    |                       | |
110    |                       | help: add `:` after the label
111    |                       the label
112    |
113    = note: labels are used before loops and blocks, allowing e.g., `break 'label` to them
114
115 error: expected `{`, found `'a`
116   --> $DIR/label-after-block-like.rs:26:23
117    |
118 LL |     while let () = () 'a {}
119    |     ----- ----------- ^^ expected `{`
120    |     |     |
121    |     |     this `while` condition successfully parsed
122    |     while parsing the body of this `while` expression
123    |
124 help: try placing this code inside a block
125    |
126 LL |     while let () = () { 'a {} }
127    |                       +       +
128
129 error: labeled expression must be followed by `:`
130   --> $DIR/label-after-block-like.rs:32:19
131    |
132 LL |     for _ in 0..0 'a {}
133    |                   ---^^
134    |                   | |
135    |                   | help: add `:` after the label
136    |                   the label
137    |
138    = note: labels are used before loops and blocks, allowing e.g., `break 'label` to them
139
140 error: expected `{`, found `'a`
141   --> $DIR/label-after-block-like.rs:32:19
142    |
143 LL |     for _ in 0..0 'a {}
144    |                   ^^ expected `{`
145    |
146 help: try placing this code inside a block
147    |
148 LL |     for _ in 0..0 { 'a {} }
149    |                   +       +
150
151 error: labeled expression must be followed by `:`
152   --> $DIR/label-after-block-like.rs:38:12
153    |
154 LL |     unsafe 'a {}
155    |            ---^^
156    |            | |
157    |            | help: add `:` after the label
158    |            the label
159    |
160    = note: labels are used before loops and blocks, allowing e.g., `break 'label` to them
161
162 error: expected `{`, found `'a`
163   --> $DIR/label-after-block-like.rs:38:12
164    |
165 LL |     unsafe 'a {}
166    |     ------ ^^ expected `{`
167    |     |
168    |     while parsing this `unsafe` expression
169    |
170 help: try placing this code inside a block
171    |
172 LL |     unsafe { 'a {} }
173    |            +       +
174
175 error: aborting due to 14 previous errors
176