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: outer attributes are not allowed on `if` and `else` branches
140 --> $DIR/attr-stmt-expr-attr-bad.rs:41:37
142 LL | #[cfg(FALSE)] fn e() { let _ = if 0 #[attr] {}; }
143 | -- ^^^^^^^ -- the attributes are attached to this branch
145 | | help: remove the attributes
146 | the branch belongs to this `if`
148 error: an inner attribute is not permitted in this context
149 --> $DIR/attr-stmt-expr-attr-bad.rs:43:38
151 LL | #[cfg(FALSE)] fn e() { let _ = if 0 {#![attr]}; }
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.
156 error: expected one of `.`, `;`, `?`, `else`, or an operator, found `#`
157 --> $DIR/attr-stmt-expr-attr-bad.rs:45:40
159 LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} #[attr] else {}; }
160 | ^ expected one of `.`, `;`, `?`, `else`, or an operator
162 error: outer attributes are not allowed on `if` and `else` branches
163 --> $DIR/attr-stmt-expr-attr-bad.rs:47:45
165 LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else #[attr] {}; }
166 | ---- ^^^^^^^ -- the attributes are attached to this branch
168 | | help: remove the attributes
169 | the branch belongs to this `else`
171 error: an inner attribute is not permitted in this context
172 --> $DIR/attr-stmt-expr-attr-bad.rs:49:46
174 LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else {#![attr]}; }
177 = 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.
179 error: outer attributes are not allowed on `if` and `else` branches
180 --> $DIR/attr-stmt-expr-attr-bad.rs:51:45
182 LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else #[attr] if 0 {}; }
183 | ---- ^^^^^^^ ------- the attributes are attached to this branch
185 | | help: remove the attributes
186 | the branch belongs to this `else`
188 error: outer attributes are not allowed on `if` and `else` branches
189 --> $DIR/attr-stmt-expr-attr-bad.rs:53:50
191 LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else if 0 #[attr] {}; }
192 | -- ^^^^^^^ -- the attributes are attached to this branch
194 | | help: remove the attributes
195 | the branch belongs to this `if`
197 error: an inner attribute is not permitted in this context
198 --> $DIR/attr-stmt-expr-attr-bad.rs:55:51
200 LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else if 0 {#![attr]}; }
203 = 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.
205 error: outer attributes are not allowed on `if` and `else` branches
206 --> $DIR/attr-stmt-expr-attr-bad.rs:57:45
208 LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 #[attr] {}; }
209 | -- ^^^^^^^ -- the attributes are attached to this branch
211 | | help: remove the attributes
212 | the branch belongs to this `if`
214 error: an inner attribute is not permitted in this context
215 --> $DIR/attr-stmt-expr-attr-bad.rs:59:46
217 LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {#![attr]}; }
220 = 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.
222 error: expected one of `.`, `;`, `?`, `else`, or an operator, found `#`
223 --> $DIR/attr-stmt-expr-attr-bad.rs:61:48
225 LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} #[attr] else {}; }
226 | ^ expected one of `.`, `;`, `?`, `else`, or an operator
228 error: outer attributes are not allowed on `if` and `else` branches
229 --> $DIR/attr-stmt-expr-attr-bad.rs:63:53
231 LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else #[attr] {}; }
232 | ---- ^^^^^^^ -- the attributes are attached to this branch
234 | | help: remove the attributes
235 | the branch belongs to this `else`
237 error: an inner attribute is not permitted in this context
238 --> $DIR/attr-stmt-expr-attr-bad.rs:65:54
240 LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else {#![attr]}; }
243 = 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.
245 error: outer attributes are not allowed on `if` and `else` branches
246 --> $DIR/attr-stmt-expr-attr-bad.rs:67:53
248 LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else #[attr] if let _ = 0 {}; }
249 | ---- ^^^^^^^ --------------- the attributes are attached to this branch
251 | | help: remove the attributes
252 | the branch belongs to this `else`
254 error: outer attributes are not allowed on `if` and `else` branches
255 --> $DIR/attr-stmt-expr-attr-bad.rs:69:66
257 LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else if let _ = 0 #[attr] {}; }
258 | -- ^^^^^^^ -- the attributes are attached to this branch
260 | | help: remove the attributes
261 | the branch belongs to this `if`
263 error: an inner attribute is not permitted in this context
264 --> $DIR/attr-stmt-expr-attr-bad.rs:71:67
266 LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else if let _ = 0 {#![attr]}; }
269 = 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.
271 error: an inner attribute is not permitted following an outer attribute
272 --> $DIR/attr-stmt-expr-attr-bad.rs:74:32
274 LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] let _ = 0; }
275 | ------- ^^^^^^^^ not permitted following an outer attribute
277 | previous outer attribute
279 = 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.
281 error: an inner attribute is not permitted following an outer attribute
282 --> $DIR/attr-stmt-expr-attr-bad.rs:76:32
284 LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] 0; }
285 | ------- ^^^^^^^^ not permitted following an outer attribute
287 | previous outer attribute
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:78:32
294 LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] foo!(); }
295 | ------- ^^^^^^^^ not permitted following an outer attribute
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:80:32
304 LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] foo![]; }
305 | ------- ^^^^^^^^ not permitted following an outer attribute
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:82:32
314 LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] foo!{}; }
315 | ------- ^^^^^^^^ not permitted following an outer attribute
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[E0586]: inclusive range with no end
322 --> $DIR/attr-stmt-expr-attr-bad.rs:88:35
324 LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] 10 => () } }
325 | ^^^ help: use `..` instead
327 = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`)
329 error: expected one of `=>`, `if`, or `|`, found `#`
330 --> $DIR/attr-stmt-expr-attr-bad.rs:88:38
332 LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] 10 => () } }
333 | ^ expected one of `=>`, `if`, or `|`
335 error[E0586]: inclusive range with no end
336 --> $DIR/attr-stmt-expr-attr-bad.rs:91:35
338 LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] -10 => () } }
339 | ^^^ help: use `..` instead
341 = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`)
343 error: expected one of `=>`, `if`, or `|`, found `#`
344 --> $DIR/attr-stmt-expr-attr-bad.rs:91:38
346 LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] -10 => () } }
347 | ^ expected one of `=>`, `if`, or `|`
349 error: unexpected token: `#`
350 --> $DIR/attr-stmt-expr-attr-bad.rs:94:39
352 LL | #[cfg(FALSE)] fn e() { match 0 { 0..=-#[attr] 10 => () } }
355 error[E0586]: inclusive range with no end
356 --> $DIR/attr-stmt-expr-attr-bad.rs:96:35
358 LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] FOO => () } }
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:96:38
366 LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] FOO => () } }
367 | ^ expected one of `=>`, `if`, or `|`
369 error: unexpected token: `#`
370 --> $DIR/attr-stmt-expr-attr-bad.rs:100:34
372 LL | #[cfg(FALSE)] fn e() { let _ = x.#![attr]foo(); }
375 error: expected one of `.`, `;`, `?`, or an operator, found `#`
376 --> $DIR/attr-stmt-expr-attr-bad.rs:100:34
378 LL | #[cfg(FALSE)] fn e() { let _ = x.#![attr]foo(); }
379 | ^ expected one of `.`, `;`, `?`, or an operator
381 error: unexpected token: `#`
382 --> $DIR/attr-stmt-expr-attr-bad.rs:103:34
384 LL | #[cfg(FALSE)] fn e() { let _ = x.#[attr]foo(); }
387 error: expected one of `.`, `;`, `?`, or an operator, found `#`
388 --> $DIR/attr-stmt-expr-attr-bad.rs:103:34
390 LL | #[cfg(FALSE)] fn e() { let _ = x.#[attr]foo(); }
391 | ^ expected one of `.`, `;`, `?`, or an operator
393 error: expected statement after outer attribute
394 --> $DIR/attr-stmt-expr-attr-bad.rs:108:37
396 LL | #[cfg(FALSE)] fn e() { { fn foo() { #[attr]; } } }
399 error: expected statement after outer attribute
400 --> $DIR/attr-stmt-expr-attr-bad.rs:110:37
402 LL | #[cfg(FALSE)] fn e() { { fn foo() { #[attr] } } }
405 error: aborting due to 53 previous errors
407 For more information about this error, try `rustc --explain E0586`.