You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
= note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them.
138
138
139
-
error: attributes are not yet allowed on `if` expressions
140
-
--> $DIR/attr-stmt-expr-attr-bad.rs:41:32
141
-
|
142
-
LL | #[cfg(FALSE)] fn e() { let _ = #[attr] if 0 {}; }
143
-
| ^^^^^^^
144
-
145
139
error: expected `{`, found `#`
146
-
--> $DIR/attr-stmt-expr-attr-bad.rs:43:37
140
+
--> $DIR/attr-stmt-expr-attr-bad.rs:41:37
147
141
|
148
142
LL | #[cfg(FALSE)] fn e() { let _ = if 0 #[attr] {}; }
149
143
| -- ^ --- help: try placing this code inside a block: `{ {}; }`
@@ -152,51 +146,45 @@ LL | #[cfg(FALSE)] fn e() { let _ = if 0 #[attr] {}; }
152
146
| this `if` expression has a condition, but no block
153
147
154
148
error: an inner attribute is not permitted in this context
155
-
--> $DIR/attr-stmt-expr-attr-bad.rs:45:38
149
+
--> $DIR/attr-stmt-expr-attr-bad.rs:43:38
156
150
|
157
151
LL | #[cfg(FALSE)] fn e() { let _ = if 0 {#![attr]}; }
158
152
| ^^^^^^^^
159
153
|
160
154
= note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them.
161
155
162
156
error: expected one of `.`, `;`, `?`, `else`, or an operator, found `#`
163
-
--> $DIR/attr-stmt-expr-attr-bad.rs:47:40
157
+
--> $DIR/attr-stmt-expr-attr-bad.rs:45:40
164
158
|
165
159
LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} #[attr] else {}; }
166
160
| ^ expected one of `.`, `;`, `?`, `else`, or an operator
167
161
168
162
error: expected `{`, found `#`
169
-
--> $DIR/attr-stmt-expr-attr-bad.rs:49:45
163
+
--> $DIR/attr-stmt-expr-attr-bad.rs:47:45
170
164
|
171
165
LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else #[attr] {}; }
172
166
| ^ --- help: try placing this code inside a block: `{ {}; }`
173
167
| |
174
168
| expected `{`
175
169
176
170
error: an inner attribute is not permitted in this context
177
-
--> $DIR/attr-stmt-expr-attr-bad.rs:51:46
171
+
--> $DIR/attr-stmt-expr-attr-bad.rs:49:46
178
172
|
179
173
LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else {#![attr]}; }
180
174
| ^^^^^^^^
181
175
|
182
176
= note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them.
183
177
184
-
error: attributes are not yet allowed on `if` expressions
185
-
--> $DIR/attr-stmt-expr-attr-bad.rs:53:45
186
-
|
187
-
LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else #[attr] if 0 {}; }
188
-
| ^^^^^^^
189
-
190
178
error: expected `{`, found `#`
191
-
--> $DIR/attr-stmt-expr-attr-bad.rs:53:45
179
+
--> $DIR/attr-stmt-expr-attr-bad.rs:51:45
192
180
|
193
181
LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else #[attr] if 0 {}; }
194
182
| ^ -------- help: try placing this code inside a block: `{ if 0 {}; }`
195
183
| |
196
184
| expected `{`
197
185
198
186
error: expected `{`, found `#`
199
-
--> $DIR/attr-stmt-expr-attr-bad.rs:56:50
187
+
--> $DIR/attr-stmt-expr-attr-bad.rs:53:50
200
188
|
201
189
LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else if 0 #[attr] {}; }
202
190
| -- ^ --- help: try placing this code inside a block: `{ {}; }`
@@ -205,21 +193,15 @@ LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else if 0 #[attr] {}; }
205
193
| this `if` expression has a condition, but no block
206
194
207
195
error: an inner attribute is not permitted in this context
208
-
--> $DIR/attr-stmt-expr-attr-bad.rs:58:51
196
+
--> $DIR/attr-stmt-expr-attr-bad.rs:55:51
209
197
|
210
198
LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else if 0 {#![attr]}; }
211
199
| ^^^^^^^^
212
200
|
213
201
= note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them.
214
202
215
-
error: attributes are not yet allowed on `if` expressions
216
-
--> $DIR/attr-stmt-expr-attr-bad.rs:60:32
217
-
|
218
-
LL | #[cfg(FALSE)] fn e() { let _ = #[attr] if let _ = 0 {}; }
219
-
| ^^^^^^^
220
-
221
203
error: expected `{`, found `#`
222
-
--> $DIR/attr-stmt-expr-attr-bad.rs:62:45
204
+
--> $DIR/attr-stmt-expr-attr-bad.rs:57:45
223
205
|
224
206
LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 #[attr] {}; }
225
207
| -- ^ --- help: try placing this code inside a block: `{ {}; }`
@@ -228,51 +210,45 @@ LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 #[attr] {}; }
228
210
| this `if` expression has a condition, but no block
229
211
230
212
error: an inner attribute is not permitted in this context
231
-
--> $DIR/attr-stmt-expr-attr-bad.rs:64:46
213
+
--> $DIR/attr-stmt-expr-attr-bad.rs:59:46
232
214
|
233
215
LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {#![attr]}; }
234
216
| ^^^^^^^^
235
217
|
236
218
= note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them.
237
219
238
220
error: expected one of `.`, `;`, `?`, `else`, or an operator, found `#`
239
-
--> $DIR/attr-stmt-expr-attr-bad.rs:66:48
221
+
--> $DIR/attr-stmt-expr-attr-bad.rs:61:48
240
222
|
241
223
LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} #[attr] else {}; }
242
224
| ^ expected one of `.`, `;`, `?`, `else`, or an operator
243
225
244
226
error: expected `{`, found `#`
245
-
--> $DIR/attr-stmt-expr-attr-bad.rs:68:53
227
+
--> $DIR/attr-stmt-expr-attr-bad.rs:63:53
246
228
|
247
229
LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else #[attr] {}; }
248
230
| ^ --- help: try placing this code inside a block: `{ {}; }`
249
231
| |
250
232
| expected `{`
251
233
252
234
error: an inner attribute is not permitted in this context
253
-
--> $DIR/attr-stmt-expr-attr-bad.rs:70:54
235
+
--> $DIR/attr-stmt-expr-attr-bad.rs:65:54
254
236
|
255
237
LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else {#![attr]}; }
256
238
| ^^^^^^^^
257
239
|
258
240
= note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them.
259
241
260
-
error: attributes are not yet allowed on `if` expressions
261
-
--> $DIR/attr-stmt-expr-attr-bad.rs:72:53
262
-
|
263
-
LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else #[attr] if let _ = 0 {}; }
264
-
| ^^^^^^^
265
-
266
242
error: expected `{`, found `#`
267
-
--> $DIR/attr-stmt-expr-attr-bad.rs:72:53
243
+
--> $DIR/attr-stmt-expr-attr-bad.rs:67:53
268
244
|
269
245
LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else #[attr] if let _ = 0 {}; }
270
246
| ^ ---------------- help: try placing this code inside a block: `{ if let _ = 0 {}; }`
271
247
| |
272
248
| expected `{`
273
249
274
250
error: expected `{`, found `#`
275
-
--> $DIR/attr-stmt-expr-attr-bad.rs:75:66
251
+
--> $DIR/attr-stmt-expr-attr-bad.rs:69:66
276
252
|
277
253
LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else if let _ = 0 #[attr] {}; }
278
254
| -- ^ --- help: try placing this code inside a block: `{ {}; }`
@@ -281,15 +257,15 @@ LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else if let _ = 0 #[attr] {}
281
257
| this `if` expression has a condition, but no block
282
258
283
259
error: an inner attribute is not permitted in this context
284
-
--> $DIR/attr-stmt-expr-attr-bad.rs:77:67
260
+
--> $DIR/attr-stmt-expr-attr-bad.rs:71:67
285
261
|
286
262
LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else if let _ = 0 {#![attr]}; }
287
263
| ^^^^^^^^
288
264
|
289
265
= note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them.
290
266
291
267
error: an inner attribute is not permitted following an outer attribute
= note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them.
300
276
301
277
error: an inner attribute is not permitted following an outer attribute
302
-
--> $DIR/attr-stmt-expr-attr-bad.rs:82:32
278
+
--> $DIR/attr-stmt-expr-attr-bad.rs:76:32
303
279
|
304
280
LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] 0; }
305
281
| ------- ^^^^^^^^ not permitted following an outer attibute
= note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them.
310
286
311
287
error: an inner attribute is not permitted following an outer attribute
= note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them.
320
296
321
297
error: an inner attribute is not permitted following an outer attribute
= note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them.
330
306
331
307
error: an inner attribute is not permitted following an outer attribute
= note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them.
0 commit comments