fork/rust
git clone https://git.julia.blue/fork/rust
b8cedc00407
1.42.0
1error: an inner attribute is not permitted in this context 2 --> $DIR/attr-stmt-expr-attr-bad.rs:5:36 3 | 4LL | #[cfg(FALSE)] fn e() { let _ = box #![attr] 0; } 5 | ^^^^^^^^ 6 | 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. 8 9error: expected expression, found `]` 10 --> $DIR/attr-stmt-expr-attr-bad.rs:7:40 11 | 12LL | #[cfg(FALSE)] fn e() { let _ = [#[attr]]; } 13 | ^ expected expression 14 15error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, or an operator, found `#` 16 --> $DIR/attr-stmt-expr-attr-bad.rs:9:35 17 | 18LL | #[cfg(FALSE)] fn e() { let _ = foo#[attr](); } 19 | ^ expected one of 7 possible tokens 20 21error: an inner attribute is not permitted in this context 22 --> $DIR/attr-stmt-expr-attr-bad.rs:11:36 23 | 24LL | #[cfg(FALSE)] fn e() { let _ = foo(#![attr]); } 25 | ^^^^^^^^ 26 | 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. 28 29error: expected expression, found `)` 30 --> $DIR/attr-stmt-expr-attr-bad.rs:11:44 31 | 32LL | #[cfg(FALSE)] fn e() { let _ = foo(#![attr]); } 33 | ^ expected expression 34 35error: an inner attribute is not permitted in this context 36 --> $DIR/attr-stmt-expr-attr-bad.rs:14:38 37 | 38LL | #[cfg(FALSE)] fn e() { let _ = x.foo(#![attr]); } 39 | ^^^^^^^^ 40 | 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. 42 43error: expected expression, found `)` 44 --> $DIR/attr-stmt-expr-attr-bad.rs:14:46 45 | 46LL | #[cfg(FALSE)] fn e() { let _ = x.foo(#![attr]); } 47 | ^ expected expression 48 49error: an inner attribute is not permitted in this context 50 --> $DIR/attr-stmt-expr-attr-bad.rs:17:36 51 | 52LL | #[cfg(FALSE)] fn e() { let _ = 0 + #![attr] 0; } 53 | ^^^^^^^^ 54 | 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. 56 57error: an inner attribute is not permitted in this context 58 --> $DIR/attr-stmt-expr-attr-bad.rs:19:33 59 | 60LL | #[cfg(FALSE)] fn e() { let _ = !#![attr] 0; } 61 | ^^^^^^^^ 62 | 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. 64 65error: an inner attribute is not permitted in this context 66 --> $DIR/attr-stmt-expr-attr-bad.rs:21:33 67 | 68LL | #[cfg(FALSE)] fn e() { let _ = -#![attr] 0; } 69 | ^^^^^^^^ 70 | 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. 72 73error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, or an operator, found `#` 74 --> $DIR/attr-stmt-expr-attr-bad.rs:23:34 75 | 76LL | #[cfg(FALSE)] fn e() { let _ = x #![attr] as Y; } 77 | ^ expected one of 7 possible tokens 78 79error: an inner attribute is not permitted in this context 80 --> $DIR/attr-stmt-expr-attr-bad.rs:25:35 81 | 82LL | #[cfg(FALSE)] fn e() { let _ = || #![attr] foo; } 83 | ^^^^^^^^ 84 | 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. 86 87error: an inner attribute is not permitted in this context 88 --> $DIR/attr-stmt-expr-attr-bad.rs:27:40 89 | 90LL | #[cfg(FALSE)] fn e() { let _ = move || #![attr] foo; } 91 | ^^^^^^^^ 92 | 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. 94 95error: an inner attribute is not permitted in this context 96 --> $DIR/attr-stmt-expr-attr-bad.rs:29:35 97 | 98LL | #[cfg(FALSE)] fn e() { let _ = || #![attr] {foo}; } 99 | ^^^^^^^^ 100 | 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. 102 103error: an inner attribute is not permitted in this context 104 --> $DIR/attr-stmt-expr-attr-bad.rs:31:40 105 | 106LL | #[cfg(FALSE)] fn e() { let _ = move || #![attr] {foo}; } 107 | ^^^^^^^^ 108 | 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. 110 111error: expected expression, found `..` 112 --> $DIR/attr-stmt-expr-attr-bad.rs:33:40 113 | 114LL | #[cfg(FALSE)] fn e() { let _ = #[attr] ..#[attr] 0; } 115 | ^^ expected expression 116 117error: expected expression, found `..` 118 --> $DIR/attr-stmt-expr-attr-bad.rs:35:40 119 | 120LL | #[cfg(FALSE)] fn e() { let _ = #[attr] ..; } 121 | ^^ expected expression 122 123error: an inner attribute is not permitted in this context 124 --> $DIR/attr-stmt-expr-attr-bad.rs:37:41 125 | 126LL | #[cfg(FALSE)] fn e() { let _ = #[attr] &#![attr] 0; } 127 | ^^^^^^^^ 128 | 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. 130 131error: an inner attribute is not permitted in this context 132 --> $DIR/attr-stmt-expr-attr-bad.rs:39:45 133 | 134LL | #[cfg(FALSE)] fn e() { let _ = #[attr] &mut #![attr] 0; } 135 | ^^^^^^^^ 136 | 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. 138 139error: attributes are not yet allowed on `if` expressions 140 --> $DIR/attr-stmt-expr-attr-bad.rs:41:32 141 | 142LL | #[cfg(FALSE)] fn e() { let _ = #[attr] if 0 {}; } 143 | ^^^^^^^ 144 145error: expected `{`, found `#` 146 --> $DIR/attr-stmt-expr-attr-bad.rs:43:37 147 | 148LL | #[cfg(FALSE)] fn e() { let _ = if 0 #[attr] {}; } 149 | -- ^ --- help: try placing this code inside a block: `{ {}; }` 150 | | | 151 | | expected `{` 152 | this `if` expression has a condition, but no block 153 154error: an inner attribute is not permitted in this context 155 --> $DIR/attr-stmt-expr-attr-bad.rs:45:38 156 | 157LL | #[cfg(FALSE)] fn e() { let _ = if 0 {#![attr]}; } 158 | ^^^^^^^^ 159 | 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. 161 162error: expected one of `.`, `;`, `?`, `else`, or an operator, found `#` 163 --> $DIR/attr-stmt-expr-attr-bad.rs:47:40 164 | 165LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} #[attr] else {}; } 166 | ^ expected one of `.`, `;`, `?`, `else`, or an operator 167 168error: expected `{`, found `#` 169 --> $DIR/attr-stmt-expr-attr-bad.rs:49:45 170 | 171LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else #[attr] {}; } 172 | ^ --- help: try placing this code inside a block: `{ {}; }` 173 | | 174 | expected `{` 175 176error: an inner attribute is not permitted in this context 177 --> $DIR/attr-stmt-expr-attr-bad.rs:51:46 178 | 179LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else {#![attr]}; } 180 | ^^^^^^^^ 181 | 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. 183 184error: attributes are not yet allowed on `if` expressions 185 --> $DIR/attr-stmt-expr-attr-bad.rs:53:45 186 | 187LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else #[attr] if 0 {}; } 188 | ^^^^^^^ 189 190error: expected `{`, found `#` 191 --> $DIR/attr-stmt-expr-attr-bad.rs:53:45 192 | 193LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else #[attr] if 0 {}; } 194 | ^ -------- help: try placing this code inside a block: `{ if 0 {}; }` 195 | | 196 | expected `{` 197 198error: expected `{`, found `#` 199 --> $DIR/attr-stmt-expr-attr-bad.rs:56:50 200 | 201LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else if 0 #[attr] {}; } 202 | -- ^ --- help: try placing this code inside a block: `{ {}; }` 203 | | | 204 | | expected `{` 205 | this `if` expression has a condition, but no block 206 207error: an inner attribute is not permitted in this context 208 --> $DIR/attr-stmt-expr-attr-bad.rs:58:51 209 | 210LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else if 0 {#![attr]}; } 211 | ^^^^^^^^ 212 | 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. 214 215error: attributes are not yet allowed on `if` expressions 216 --> $DIR/attr-stmt-expr-attr-bad.rs:60:32 217 | 218LL | #[cfg(FALSE)] fn e() { let _ = #[attr] if let _ = 0 {}; } 219 | ^^^^^^^ 220 221error: expected `{`, found `#` 222 --> $DIR/attr-stmt-expr-attr-bad.rs:62:45 223 | 224LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 #[attr] {}; } 225 | -- ^ --- help: try placing this code inside a block: `{ {}; }` 226 | | | 227 | | expected `{` 228 | this `if` expression has a condition, but no block 229 230error: an inner attribute is not permitted in this context 231 --> $DIR/attr-stmt-expr-attr-bad.rs:64:46 232 | 233LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {#![attr]}; } 234 | ^^^^^^^^ 235 | 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. 237 238error: expected one of `.`, `;`, `?`, `else`, or an operator, found `#` 239 --> $DIR/attr-stmt-expr-attr-bad.rs:66:48 240 | 241LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} #[attr] else {}; } 242 | ^ expected one of `.`, `;`, `?`, `else`, or an operator 243 244error: expected `{`, found `#` 245 --> $DIR/attr-stmt-expr-attr-bad.rs:68:53 246 | 247LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else #[attr] {}; } 248 | ^ --- help: try placing this code inside a block: `{ {}; }` 249 | | 250 | expected `{` 251 252error: an inner attribute is not permitted in this context 253 --> $DIR/attr-stmt-expr-attr-bad.rs:70:54 254 | 255LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else {#![attr]}; } 256 | ^^^^^^^^ 257 | 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. 259 260error: attributes are not yet allowed on `if` expressions 261 --> $DIR/attr-stmt-expr-attr-bad.rs:72:53 262 | 263LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else #[attr] if let _ = 0 {}; } 264 | ^^^^^^^ 265 266error: expected `{`, found `#` 267 --> $DIR/attr-stmt-expr-attr-bad.rs:72:53 268 | 269LL | #[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 {}; }` 271 | | 272 | expected `{` 273 274error: expected `{`, found `#` 275 --> $DIR/attr-stmt-expr-attr-bad.rs:75:66 276 | 277LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else if let _ = 0 #[attr] {}; } 278 | -- ^ --- help: try placing this code inside a block: `{ {}; }` 279 | | | 280 | | expected `{` 281 | this `if` expression has a condition, but no block 282 283error: an inner attribute is not permitted in this context 284 --> $DIR/attr-stmt-expr-attr-bad.rs:77:67 285 | 286LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else if let _ = 0 {#![attr]}; } 287 | ^^^^^^^^ 288 | 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. 290 291error: an inner attribute is not permitted following an outer attribute 292 --> $DIR/attr-stmt-expr-attr-bad.rs:80:32 293 | 294LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] let _ = 0; } 295 | ------- ^^^^^^^^ not permitted following an outer attibute 296 | | 297 | previous outer attribute 298 | 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. 300 301error: an inner attribute is not permitted following an outer attribute 302 --> $DIR/attr-stmt-expr-attr-bad.rs:82:32 303 | 304LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] 0; } 305 | ------- ^^^^^^^^ not permitted following an outer attibute 306 | | 307 | previous outer attribute 308 | 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. 310 311error: an inner attribute is not permitted following an outer attribute 312 --> $DIR/attr-stmt-expr-attr-bad.rs:84:32 313 | 314LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] foo!(); } 315 | ------- ^^^^^^^^ not permitted following an outer attibute 316 | | 317 | previous outer attribute 318 | 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. 320 321error: an inner attribute is not permitted following an outer attribute 322 --> $DIR/attr-stmt-expr-attr-bad.rs:86:32 323 | 324LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] foo![]; } 325 | ------- ^^^^^^^^ not permitted following an outer attibute 326 | | 327 | previous outer attribute 328 | 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. 330 331error: an inner attribute is not permitted following an outer attribute 332 --> $DIR/attr-stmt-expr-attr-bad.rs:88:32 333 | 334LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] foo!{}; } 335 | ------- ^^^^^^^^ not permitted following an outer attibute 336 | | 337 | previous outer attribute 338 | 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. 340 341error[E0586]: inclusive range with no end 342 --> $DIR/attr-stmt-expr-attr-bad.rs:94:35 343 | 344LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] 10 => () } } 345 | ^^^ help: use `..` instead 346 | 347 = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) 348 349error: expected one of `=>`, `if`, or `|`, found `#` 350 --> $DIR/attr-stmt-expr-attr-bad.rs:94:38 351 | 352LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] 10 => () } } 353 | ^ expected one of `=>`, `if`, or `|` 354 355error[E0586]: inclusive range with no end 356 --> $DIR/attr-stmt-expr-attr-bad.rs:97:35 357 | 358LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] -10 => () } } 359 | ^^^ help: use `..` instead 360 | 361 = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) 362 363error: expected one of `=>`, `if`, or `|`, found `#` 364 --> $DIR/attr-stmt-expr-attr-bad.rs:97:38 365 | 366LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] -10 => () } } 367 | ^ expected one of `=>`, `if`, or `|` 368 369error: unexpected token: `#` 370 --> $DIR/attr-stmt-expr-attr-bad.rs:100:39 371 | 372LL | #[cfg(FALSE)] fn e() { match 0 { 0..=-#[attr] 10 => () } } 373 | ^ 374 375error[E0586]: inclusive range with no end 376 --> $DIR/attr-stmt-expr-attr-bad.rs:102:35 377 | 378LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] FOO => () } } 379 | ^^^ help: use `..` instead 380 | 381 = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) 382 383error: expected one of `=>`, `if`, or `|`, found `#` 384 --> $DIR/attr-stmt-expr-attr-bad.rs:102:38 385 | 386LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] FOO => () } } 387 | ^ expected one of `=>`, `if`, or `|` 388 389error: unexpected token: `#` 390 --> $DIR/attr-stmt-expr-attr-bad.rs:106:34 391 | 392LL | #[cfg(FALSE)] fn e() { let _ = x.#![attr]foo(); } 393 | ^ 394 395error: expected one of `.`, `;`, `?`, or an operator, found `#` 396 --> $DIR/attr-stmt-expr-attr-bad.rs:106:34 397 | 398LL | #[cfg(FALSE)] fn e() { let _ = x.#![attr]foo(); } 399 | ^ expected one of `.`, `;`, `?`, or an operator 400 401error: unexpected token: `#` 402 --> $DIR/attr-stmt-expr-attr-bad.rs:109:34 403 | 404LL | #[cfg(FALSE)] fn e() { let _ = x.#[attr]foo(); } 405 | ^ 406 407error: expected one of `.`, `;`, `?`, or an operator, found `#` 408 --> $DIR/attr-stmt-expr-attr-bad.rs:109:34 409 | 410LL | #[cfg(FALSE)] fn e() { let _ = x.#[attr]foo(); } 411 | ^ expected one of `.`, `;`, `?`, or an operator 412 413error: expected statement after outer attribute 414 --> $DIR/attr-stmt-expr-attr-bad.rs:114:44 415 | 416LL | #[cfg(FALSE)] fn e() { { fn foo() { #[attr]; } } } 417 | ^ 418 419error: expected statement after outer attribute 420 --> $DIR/attr-stmt-expr-attr-bad.rs:116:45 421 | 422LL | #[cfg(FALSE)] fn e() { { fn foo() { #[attr] } } } 423 | ^ 424 425error: aborting due to 57 previous errors 426 427For more information about this error, try `rustc --explain E0586`.