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