1 error: an inner attribute is not permitted in this context
2 --> $DIR/attr-stmt-expr-attr-bad.rs:5:36
4 LL | #[cfg(FALSE)] fn e() { let _ = box #![attr] 0; }
7 = 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.
9 error: expected expression, found `]`
10 --> $DIR/attr-stmt-expr-attr-bad.rs:7:40
12 LL | #[cfg(FALSE)] fn e() { let _ = [#[attr]]; }
13 | ^ expected expression
15 error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, or an operator, found `#`
16 --> $DIR/attr-stmt-expr-attr-bad.rs:9:35
18 LL | #[cfg(FALSE)] fn e() { let _ = foo#[attr](); }
19 | ^ expected one of 7 possible tokens
21 error: an inner attribute is not permitted in this context
22 --> $DIR/attr-stmt-expr-attr-bad.rs:11:36
24 LL | #[cfg(FALSE)] fn e() { let _ = foo(#![attr]); }
27 = 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.
29 error: expected expression, found `)`
30 --> $DIR/attr-stmt-expr-attr-bad.rs:11:44
32 LL | #[cfg(FALSE)] fn e() { let _ = foo(#![attr]); }
33 | ^ expected expression
35 error: an inner attribute is not permitted in this context
36 --> $DIR/attr-stmt-expr-attr-bad.rs:14:38
38 LL | #[cfg(FALSE)] fn e() { let _ = x.foo(#![attr]); }
41 = 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.
43 error: expected expression, found `)`
44 --> $DIR/attr-stmt-expr-attr-bad.rs:14:46
46 LL | #[cfg(FALSE)] fn e() { let _ = x.foo(#![attr]); }
47 | ^ expected expression
49 error: an inner attribute is not permitted in this context
50 --> $DIR/attr-stmt-expr-attr-bad.rs:17:36
52 LL | #[cfg(FALSE)] fn e() { let _ = 0 + #![attr] 0; }
55 = 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.
57 error: an inner attribute is not permitted in this context
58 --> $DIR/attr-stmt-expr-attr-bad.rs:19:33
60 LL | #[cfg(FALSE)] fn e() { let _ = !#![attr] 0; }
63 = 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.
65 error: an inner attribute is not permitted in this context
66 --> $DIR/attr-stmt-expr-attr-bad.rs:21:33
68 LL | #[cfg(FALSE)] fn e() { let _ = -#![attr] 0; }
71 = 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.
73 error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, or an operator, found `#`
74 --> $DIR/attr-stmt-expr-attr-bad.rs:23:34
76 LL | #[cfg(FALSE)] fn e() { let _ = x #![attr] as Y; }
77 | ^ expected one of 7 possible tokens
79 error: an inner attribute is not permitted in this context
80 --> $DIR/attr-stmt-expr-attr-bad.rs:25:35
82 LL | #[cfg(FALSE)] fn e() { let _ = || #![attr] foo; }
85 = 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.
87 error: an inner attribute is not permitted in this context
88 --> $DIR/attr-stmt-expr-attr-bad.rs:27:40
90 LL | #[cfg(FALSE)] fn e() { let _ = move || #![attr] foo; }
93 = 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.
95 error: an inner attribute is not permitted in this context
96 --> $DIR/attr-stmt-expr-attr-bad.rs:29:35
98 LL | #[cfg(FALSE)] fn e() { let _ = || #![attr] {foo}; }
101 = 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.
103 error: an inner attribute is not permitted in this context
104 --> $DIR/attr-stmt-expr-attr-bad.rs:31:40
106 LL | #[cfg(FALSE)] fn e() { let _ = move || #![attr] {foo}; }
109 = 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.
111 error: expected expression, found `..`
112 --> $DIR/attr-stmt-expr-attr-bad.rs:33:40
114 LL | #[cfg(FALSE)] fn e() { let _ = #[attr] ..#[attr] 0; }
115 | ^^ expected expression
117 error: expected expression, found `..`
118 --> $DIR/attr-stmt-expr-attr-bad.rs:35:40
120 LL | #[cfg(FALSE)] fn e() { let _ = #[attr] ..; }
121 | ^^ expected expression
123 error: an inner attribute is not permitted in this context
124 --> $DIR/attr-stmt-expr-attr-bad.rs:37:41
126 LL | #[cfg(FALSE)] fn e() { let _ = #[attr] &#![attr] 0; }
129 = 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.
131 error: an inner attribute is not permitted in this context
132 --> $DIR/attr-stmt-expr-attr-bad.rs:39:45
134 LL | #[cfg(FALSE)] fn e() { let _ = #[attr] &mut #![attr] 0; }
137 = 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.
139 error: attributes are not yet allowed on `if` expressions
140 --> $DIR/attr-stmt-expr-attr-bad.rs:41:32
142 LL | #[cfg(FALSE)] fn e() { let _ = #[attr] if 0 {}; }
145 error: expected `{`, found `#`
146 --> $DIR/attr-stmt-expr-attr-bad.rs:43:37
148 LL | #[cfg(FALSE)] fn e() { let _ = if 0 #[attr] {}; }
149 | -- ^ --- help: try placing this code inside a block: `{ {}; }`
152 | this `if` expression has a condition, but no block
154 error: an inner attribute is not permitted in this context
155 --> $DIR/attr-stmt-expr-attr-bad.rs:45:38
157 LL | #[cfg(FALSE)] fn e() { let _ = if 0 {#![attr]}; }
160 = 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.
162 error: expected one of `.`, `;`, `?`, `else`, or an operator, found `#`
163 --> $DIR/attr-stmt-expr-attr-bad.rs:47:40
165 LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} #[attr] else {}; }
166 | ^ expected one of `.`, `;`, `?`, `else`, or an operator
168 error: expected `{`, found `#`
169 --> $DIR/attr-stmt-expr-attr-bad.rs:49:45
171 LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else #[attr] {}; }
172 | ^ --- help: try placing this code inside a block: `{ {}; }`
176 error: an inner attribute is not permitted in this context
177 --> $DIR/attr-stmt-expr-attr-bad.rs:51:46
179 LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else {#![attr]}; }
182 = 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.
184 error: attributes are not yet allowed on `if` expressions
185 --> $DIR/attr-stmt-expr-attr-bad.rs:53:45
187 LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else #[attr] if 0 {}; }
190 error: expected `{`, found `#`
191 --> $DIR/attr-stmt-expr-attr-bad.rs:53:45
193 LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else #[attr] if 0 {}; }
194 | ^ -------- help: try placing this code inside a block: `{ if 0 {}; }`
198 error: expected `{`, found `#`
199 --> $DIR/attr-stmt-expr-attr-bad.rs:56:50
201 LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else if 0 #[attr] {}; }
202 | -- ^ --- help: try placing this code inside a block: `{ {}; }`
205 | this `if` expression has a condition, but no block
207 error: an inner attribute is not permitted in this context
208 --> $DIR/attr-stmt-expr-attr-bad.rs:58:51
210 LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else if 0 {#![attr]}; }
213 = 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.
215 error: attributes are not yet allowed on `if` expressions
216 --> $DIR/attr-stmt-expr-attr-bad.rs:60:32
218 LL | #[cfg(FALSE)] fn e() { let _ = #[attr] if let _ = 0 {}; }
221 error: expected `{`, found `#`
222 --> $DIR/attr-stmt-expr-attr-bad.rs:62:45
224 LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 #[attr] {}; }
225 | -- ^ --- help: try placing this code inside a block: `{ {}; }`
228 | this `if` expression has a condition, but no block
230 error: an inner attribute is not permitted in this context
231 --> $DIR/attr-stmt-expr-attr-bad.rs:64:46
233 LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {#![attr]}; }
236 = 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.
238 error: expected one of `.`, `;`, `?`, `else`, or an operator, found `#`
239 --> $DIR/attr-stmt-expr-attr-bad.rs:66:48
241 LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} #[attr] else {}; }
242 | ^ expected one of `.`, `;`, `?`, `else`, or an operator
244 error: expected `{`, found `#`
245 --> $DIR/attr-stmt-expr-attr-bad.rs:68:53
247 LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else #[attr] {}; }
248 | ^ --- help: try placing this code inside a block: `{ {}; }`
252 error: an inner attribute is not permitted in this context
253 --> $DIR/attr-stmt-expr-attr-bad.rs:70:54
255 LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else {#![attr]}; }
258 = 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.
260 error: attributes are not yet allowed on `if` expressions
261 --> $DIR/attr-stmt-expr-attr-bad.rs:72:53
263 LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else #[attr] if let _ = 0 {}; }
266 error: expected `{`, found `#`
267 --> $DIR/attr-stmt-expr-attr-bad.rs:72:53
269 LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else #[attr] if let _ = 0 {}; }
270 | ^ ---------------- help: try placing this code inside a block: `{ if let _ = 0 {}; }`
274 error: expected `{`, found `#`
275 --> $DIR/attr-stmt-expr-attr-bad.rs:75:66
277 LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else if let _ = 0 #[attr] {}; }
278 | -- ^ --- help: try placing this code inside a block: `{ {}; }`
281 | this `if` expression has a condition, but no block
283 error: an inner attribute is not permitted in this context
284 --> $DIR/attr-stmt-expr-attr-bad.rs:77:67
286 LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else if let _ = 0 {#![attr]}; }
289 = 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.
291 error: an inner attribute is not permitted following an outer attribute
292 --> $DIR/attr-stmt-expr-attr-bad.rs:80:32
294 LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] let _ = 0; }
295 | ------- ^^^^^^^^ not permitted following an outer attibute
297 | previous outer attribute
299 = 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.
301 error: an inner attribute is not permitted following an outer attribute
302 --> $DIR/attr-stmt-expr-attr-bad.rs:82:32
304 LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] 0; }
305 | ------- ^^^^^^^^ not permitted following an outer attibute
307 | previous outer attribute
309 = 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.
311 error: an inner attribute is not permitted following an outer attribute
312 --> $DIR/attr-stmt-expr-attr-bad.rs:84:32
314 LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] foo!(); }
315 | ------- ^^^^^^^^ not permitted following an outer attibute
317 | previous outer attribute
319 = 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.
321 error: an inner attribute is not permitted following an outer attribute
322 --> $DIR/attr-stmt-expr-attr-bad.rs:86:32
324 LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] foo![]; }
325 | ------- ^^^^^^^^ not permitted following an outer attibute
327 | previous outer attribute
329 = 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.
331 error: an inner attribute is not permitted following an outer attribute
332 --> $DIR/attr-stmt-expr-attr-bad.rs:88:32
334 LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] foo!{}; }
335 | ------- ^^^^^^^^ not permitted following an outer attibute
337 | previous outer attribute
339 = 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.
341 error[E0586]: inclusive range with no end
342 --> $DIR/attr-stmt-expr-attr-bad.rs:94:35
344 LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] 10 => () } }
345 | ^^^ help: use `..` instead
347 = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`)
349 error: expected one of `=>`, `if`, or `|`, found `#`
350 --> $DIR/attr-stmt-expr-attr-bad.rs:94:38
352 LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] 10 => () } }
353 | ^ expected one of `=>`, `if`, or `|`
355 error[E0586]: inclusive range with no end
356 --> $DIR/attr-stmt-expr-attr-bad.rs:97:35
358 LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] -10 => () } }
359 | ^^^ help: use `..` instead
361 = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`)
363 error: expected one of `=>`, `if`, or `|`, found `#`
364 --> $DIR/attr-stmt-expr-attr-bad.rs:97:38
366 LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] -10 => () } }
367 | ^ expected one of `=>`, `if`, or `|`
369 error: unexpected token: `#`
370 --> $DIR/attr-stmt-expr-attr-bad.rs:100:39
372 LL | #[cfg(FALSE)] fn e() { match 0 { 0..=-#[attr] 10 => () } }
375 error[E0586]: inclusive range with no end
376 --> $DIR/attr-stmt-expr-attr-bad.rs:102:35
378 LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] FOO => () } }
379 | ^^^ help: use `..` instead
381 = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`)
383 error: expected one of `=>`, `if`, or `|`, found `#`
384 --> $DIR/attr-stmt-expr-attr-bad.rs:102:38
386 LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] FOO => () } }
387 | ^ expected one of `=>`, `if`, or `|`
389 error: unexpected token: `#`
390 --> $DIR/attr-stmt-expr-attr-bad.rs:106:34
392 LL | #[cfg(FALSE)] fn e() { let _ = x.#![attr]foo(); }
395 error: expected one of `.`, `;`, `?`, or an operator, found `#`
396 --> $DIR/attr-stmt-expr-attr-bad.rs:106:34
398 LL | #[cfg(FALSE)] fn e() { let _ = x.#![attr]foo(); }
399 | ^ expected one of `.`, `;`, `?`, or an operator
401 error: unexpected token: `#`
402 --> $DIR/attr-stmt-expr-attr-bad.rs:109:34
404 LL | #[cfg(FALSE)] fn e() { let _ = x.#[attr]foo(); }
407 error: expected one of `.`, `;`, `?`, or an operator, found `#`
408 --> $DIR/attr-stmt-expr-attr-bad.rs:109:34
410 LL | #[cfg(FALSE)] fn e() { let _ = x.#[attr]foo(); }
411 | ^ expected one of `.`, `;`, `?`, or an operator
413 error: expected statement after outer attribute
414 --> $DIR/attr-stmt-expr-attr-bad.rs:114:44
416 LL | #[cfg(FALSE)] fn e() { { fn foo() { #[attr]; } } }
419 error: expected statement after outer attribute
420 --> $DIR/attr-stmt-expr-attr-bad.rs:116:45
422 LL | #[cfg(FALSE)] fn e() { { fn foo() { #[attr] } } }
425 error: aborting due to 57 previous errors
427 For more information about this error, try `rustc --explain E0586`.