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
8 = note: outer attributes, like `#[test]`, annotate the item following them
10 error: expected expression, found `]`
11 --> $DIR/attr-stmt-expr-attr-bad.rs:7:40
13 LL | #[cfg(FALSE)] fn e() { let _ = [#[attr]]; }
14 | ^ expected expression
16 error: expected one of `!`, `.`, `::`, `;`, `?`, `else`, `{`, or an operator, found `#`
17 --> $DIR/attr-stmt-expr-attr-bad.rs:9:35
19 LL | #[cfg(FALSE)] fn e() { let _ = foo#[attr](); }
20 | ^ expected one of 8 possible tokens
22 error: an inner attribute is not permitted in this context
23 --> $DIR/attr-stmt-expr-attr-bad.rs:11:36
25 LL | #[cfg(FALSE)] fn e() { let _ = foo(#![attr]); }
28 = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files
29 = note: outer attributes, like `#[test]`, annotate the item following them
31 error: expected expression, found `)`
32 --> $DIR/attr-stmt-expr-attr-bad.rs:11:44
34 LL | #[cfg(FALSE)] fn e() { let _ = foo(#![attr]); }
35 | ^ expected expression
37 error: an inner attribute is not permitted in this context
38 --> $DIR/attr-stmt-expr-attr-bad.rs:14:38
40 LL | #[cfg(FALSE)] fn e() { let _ = x.foo(#![attr]); }
43 = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files
44 = note: outer attributes, like `#[test]`, annotate the item following them
46 error: expected expression, found `)`
47 --> $DIR/attr-stmt-expr-attr-bad.rs:14:46
49 LL | #[cfg(FALSE)] fn e() { let _ = x.foo(#![attr]); }
50 | ^ expected expression
52 error: an inner attribute is not permitted in this context
53 --> $DIR/attr-stmt-expr-attr-bad.rs:17:36
55 LL | #[cfg(FALSE)] fn e() { let _ = 0 + #![attr] 0; }
58 = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files
59 = note: outer attributes, like `#[test]`, annotate the item following them
61 error: an inner attribute is not permitted in this context
62 --> $DIR/attr-stmt-expr-attr-bad.rs:19:33
64 LL | #[cfg(FALSE)] fn e() { let _ = !#![attr] 0; }
67 = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files
68 = note: outer attributes, like `#[test]`, annotate the item following them
70 error: an inner attribute is not permitted in this context
71 --> $DIR/attr-stmt-expr-attr-bad.rs:21:33
73 LL | #[cfg(FALSE)] fn e() { let _ = -#![attr] 0; }
76 = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files
77 = note: outer attributes, like `#[test]`, annotate the item following them
79 error: expected one of `!`, `.`, `::`, `;`, `?`, `else`, `{`, or an operator, found `#`
80 --> $DIR/attr-stmt-expr-attr-bad.rs:23:34
82 LL | #[cfg(FALSE)] fn e() { let _ = x #![attr] as Y; }
83 | ^ expected one of 8 possible tokens
85 error: an inner attribute is not permitted in this context
86 --> $DIR/attr-stmt-expr-attr-bad.rs:25:35
88 LL | #[cfg(FALSE)] fn e() { let _ = || #![attr] foo; }
91 = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files
92 = note: outer attributes, like `#[test]`, annotate the item following them
94 error: an inner attribute is not permitted in this context
95 --> $DIR/attr-stmt-expr-attr-bad.rs:27:40
97 LL | #[cfg(FALSE)] fn e() { let _ = move || #![attr] foo; }
100 = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files
101 = note: 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:29:35
106 LL | #[cfg(FALSE)] fn e() { let _ = || #![attr] {foo}; }
109 = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files
110 = note: outer attributes, like `#[test]`, annotate the item following them
112 error: an inner attribute is not permitted in this context
113 --> $DIR/attr-stmt-expr-attr-bad.rs:31:40
115 LL | #[cfg(FALSE)] fn e() { let _ = move || #![attr] {foo}; }
118 = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files
119 = note: outer attributes, like `#[test]`, annotate the item following them
121 error: expected expression, found `..`
122 --> $DIR/attr-stmt-expr-attr-bad.rs:33:40
124 LL | #[cfg(FALSE)] fn e() { let _ = #[attr] ..#[attr] 0; }
125 | ^^ expected expression
127 error: expected expression, found `..`
128 --> $DIR/attr-stmt-expr-attr-bad.rs:35:40
130 LL | #[cfg(FALSE)] fn e() { let _ = #[attr] ..; }
131 | ^^ expected expression
133 error: an inner attribute is not permitted in this context
134 --> $DIR/attr-stmt-expr-attr-bad.rs:37:41
136 LL | #[cfg(FALSE)] fn e() { let _ = #[attr] &#![attr] 0; }
139 = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files
140 = note: outer attributes, like `#[test]`, annotate the item following them
142 error: an inner attribute is not permitted in this context
143 --> $DIR/attr-stmt-expr-attr-bad.rs:39:45
145 LL | #[cfg(FALSE)] fn e() { let _ = #[attr] &mut #![attr] 0; }
148 = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files
149 = note: outer attributes, like `#[test]`, annotate the item following them
151 error: outer attributes are not allowed on `if` and `else` branches
152 --> $DIR/attr-stmt-expr-attr-bad.rs:41:37
154 LL | #[cfg(FALSE)] fn e() { let _ = if 0 #[attr] {}; }
155 | -- ^^^^^^^ -- the attributes are attached to this branch
157 | | help: remove the attributes
158 | the branch belongs to this `if`
160 error: an inner attribute is not permitted in this context
161 --> $DIR/attr-stmt-expr-attr-bad.rs:43:38
163 LL | #[cfg(FALSE)] fn e() { let _ = if 0 {#![attr]}; }
166 = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files
167 = note: outer attributes, like `#[test]`, annotate the item following them
169 error: expected one of `.`, `;`, `?`, `else`, or an operator, found `#`
170 --> $DIR/attr-stmt-expr-attr-bad.rs:45:40
172 LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} #[attr] else {}; }
173 | ^ expected one of `.`, `;`, `?`, `else`, or an operator
175 error: outer attributes are not allowed on `if` and `else` branches
176 --> $DIR/attr-stmt-expr-attr-bad.rs:47:45
178 LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else #[attr] {}; }
179 | ---- ^^^^^^^ -- the attributes are attached to this branch
181 | | help: remove the attributes
182 | the branch belongs to this `else`
184 error: an inner attribute is not permitted in this context
185 --> $DIR/attr-stmt-expr-attr-bad.rs:49:46
187 LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else {#![attr]}; }
190 = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files
191 = note: outer attributes, like `#[test]`, annotate the item following them
193 error: outer attributes are not allowed on `if` and `else` branches
194 --> $DIR/attr-stmt-expr-attr-bad.rs:51:45
196 LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else #[attr] if 0 {}; }
197 | ---- ^^^^^^^ ------- the attributes are attached to this branch
199 | | help: remove the attributes
200 | the branch belongs to this `else`
202 error: outer attributes are not allowed on `if` and `else` branches
203 --> $DIR/attr-stmt-expr-attr-bad.rs:53:50
205 LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else if 0 #[attr] {}; }
206 | -- ^^^^^^^ -- the attributes are attached to this branch
208 | | help: remove the attributes
209 | the branch belongs to this `if`
211 error: an inner attribute is not permitted in this context
212 --> $DIR/attr-stmt-expr-attr-bad.rs:55:51
214 LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else if 0 {#![attr]}; }
217 = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files
218 = note: outer attributes, like `#[test]`, annotate the item following them
220 error: outer attributes are not allowed on `if` and `else` branches
221 --> $DIR/attr-stmt-expr-attr-bad.rs:57:45
223 LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 #[attr] {}; }
224 | -- ^^^^^^^ -- the attributes are attached to this branch
226 | | help: remove the attributes
227 | the branch belongs to this `if`
229 error: an inner attribute is not permitted in this context
230 --> $DIR/attr-stmt-expr-attr-bad.rs:59:46
232 LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {#![attr]}; }
235 = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files
236 = note: 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:61:48
241 LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} #[attr] else {}; }
242 | ^ expected one of `.`, `;`, `?`, `else`, or an operator
244 error: outer attributes are not allowed on `if` and `else` branches
245 --> $DIR/attr-stmt-expr-attr-bad.rs:63:53
247 LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else #[attr] {}; }
248 | ---- ^^^^^^^ -- the attributes are attached to this branch
250 | | help: remove the attributes
251 | the branch belongs to this `else`
253 error: an inner attribute is not permitted in this context
254 --> $DIR/attr-stmt-expr-attr-bad.rs:65:54
256 LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else {#![attr]}; }
259 = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files
260 = note: outer attributes, like `#[test]`, annotate the item following them
262 error: outer attributes are not allowed on `if` and `else` branches
263 --> $DIR/attr-stmt-expr-attr-bad.rs:67:53
265 LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else #[attr] if let _ = 0 {}; }
266 | ---- ^^^^^^^ --------------- the attributes are attached to this branch
268 | | help: remove the attributes
269 | the branch belongs to this `else`
271 error: outer attributes are not allowed on `if` and `else` branches
272 --> $DIR/attr-stmt-expr-attr-bad.rs:69:66
274 LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else if let _ = 0 #[attr] {}; }
275 | -- ^^^^^^^ -- the attributes are attached to this branch
277 | | help: remove the attributes
278 | the branch belongs to this `if`
280 error: an inner attribute is not permitted in this context
281 --> $DIR/attr-stmt-expr-attr-bad.rs:71:67
283 LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else if let _ = 0 {#![attr]}; }
286 = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files
287 = note: outer attributes, like `#[test]`, annotate the item following them
289 error: an inner attribute is not permitted following an outer attribute
290 --> $DIR/attr-stmt-expr-attr-bad.rs:74:32
292 LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] let _ = 0; }
293 | ------- ^^^^^^^^ not permitted following an outer attribute
295 | previous outer attribute
297 = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files
298 = note: outer attributes, like `#[test]`, annotate the item following them
300 error: an inner attribute is not permitted following an outer attribute
301 --> $DIR/attr-stmt-expr-attr-bad.rs:76:32
303 LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] 0; }
304 | ------- ^^^^^^^^ not permitted following an outer attribute
306 | previous outer attribute
308 = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files
309 = note: 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:78:32
314 LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] foo!(); }
315 | ------- ^^^^^^^^ ------- the inner attribute doesn't annotate this item macro invocation
317 | | not permitted following an outer attribute
318 | previous outer attribute
320 = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files
321 help: to annotate the item macro invocation, change the attribute from inner to outer style
323 LL - #[cfg(FALSE)] fn s() { #[attr] #![attr] foo!(); }
324 LL + #[cfg(FALSE)] fn s() { #[attr] #[attr] foo!(); }
327 error: an inner attribute is not permitted following an outer attribute
328 --> $DIR/attr-stmt-expr-attr-bad.rs:80:32
330 LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] foo![]; }
331 | ------- ^^^^^^^^ ------- the inner attribute doesn't annotate this item macro invocation
333 | | not permitted following an outer attribute
334 | previous outer attribute
336 = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files
337 help: to annotate the item macro invocation, change the attribute from inner to outer style
339 LL - #[cfg(FALSE)] fn s() { #[attr] #![attr] foo![]; }
340 LL + #[cfg(FALSE)] fn s() { #[attr] #[attr] foo![]; }
343 error: an inner attribute is not permitted following an outer attribute
344 --> $DIR/attr-stmt-expr-attr-bad.rs:82:32
346 LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] foo!{}; }
347 | ------- ^^^^^^^^ ------ the inner attribute doesn't annotate this item macro invocation
349 | | not permitted following an outer attribute
350 | previous outer attribute
352 = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files
353 help: to annotate the item macro invocation, change the attribute from inner to outer style
355 LL - #[cfg(FALSE)] fn s() { #[attr] #![attr] foo!{}; }
356 LL + #[cfg(FALSE)] fn s() { #[attr] #[attr] foo!{}; }
359 error[E0586]: inclusive range with no end
360 --> $DIR/attr-stmt-expr-attr-bad.rs:88:35
362 LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] 10 => () } }
363 | ^^^ help: use `..` instead
365 = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`)
367 error: expected one of `=>`, `if`, or `|`, found `#`
368 --> $DIR/attr-stmt-expr-attr-bad.rs:88:38
370 LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] 10 => () } }
371 | ^ expected one of `=>`, `if`, or `|`
373 error[E0586]: inclusive range with no end
374 --> $DIR/attr-stmt-expr-attr-bad.rs:91:35
376 LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] -10 => () } }
377 | ^^^ help: use `..` instead
379 = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`)
381 error: expected one of `=>`, `if`, or `|`, found `#`
382 --> $DIR/attr-stmt-expr-attr-bad.rs:91:38
384 LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] -10 => () } }
385 | ^ expected one of `=>`, `if`, or `|`
387 error: unexpected token: `#`
388 --> $DIR/attr-stmt-expr-attr-bad.rs:94:39
390 LL | #[cfg(FALSE)] fn e() { match 0 { 0..=-#[attr] 10 => () } }
393 error[E0586]: inclusive range with no end
394 --> $DIR/attr-stmt-expr-attr-bad.rs:96:35
396 LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] FOO => () } }
397 | ^^^ help: use `..` instead
399 = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`)
401 error: expected one of `=>`, `if`, or `|`, found `#`
402 --> $DIR/attr-stmt-expr-attr-bad.rs:96:38
404 LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] FOO => () } }
405 | ^ expected one of `=>`, `if`, or `|`
407 error: unexpected token: `#`
408 --> $DIR/attr-stmt-expr-attr-bad.rs:100:34
410 LL | #[cfg(FALSE)] fn e() { let _ = x.#![attr]foo(); }
413 error: expected one of `.`, `;`, `?`, `else`, or an operator, found `#`
414 --> $DIR/attr-stmt-expr-attr-bad.rs:100:34
416 LL | #[cfg(FALSE)] fn e() { let _ = x.#![attr]foo(); }
417 | ^ expected one of `.`, `;`, `?`, `else`, or an operator
419 error: unexpected token: `#`
420 --> $DIR/attr-stmt-expr-attr-bad.rs:103:34
422 LL | #[cfg(FALSE)] fn e() { let _ = x.#[attr]foo(); }
425 error: expected one of `.`, `;`, `?`, `else`, or an operator, found `#`
426 --> $DIR/attr-stmt-expr-attr-bad.rs:103:34
428 LL | #[cfg(FALSE)] fn e() { let _ = x.#[attr]foo(); }
429 | ^ expected one of `.`, `;`, `?`, `else`, or an operator
431 error: expected statement after outer attribute
432 --> $DIR/attr-stmt-expr-attr-bad.rs:108:37
434 LL | #[cfg(FALSE)] fn e() { { fn foo() { #[attr]; } } }
437 error: expected statement after outer attribute
438 --> $DIR/attr-stmt-expr-attr-bad.rs:110:37
440 LL | #[cfg(FALSE)] fn e() { { fn foo() { #[attr] } } }
443 error: aborting due to 53 previous errors
445 For more information about this error, try `rustc --explain E0586`.