fork/rust
git clone https://git.julia.blue/fork/rust
49cae55760d
1.44.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: outer attributes are not allowed on `if` and `else` branches 140 --> $DIR/attr-stmt-expr-attr-bad.rs:41:37 141 | 142LL | #[cfg(FALSE)] fn e() { let _ = if 0 #[attr] {}; } 143 | -- ^^^^^^^ -- the attributes are attached to this branch 144 | | | 145 | | help: remove the attributes 146 | the branch belongs to this `if` 147 148error: an inner attribute is not permitted in this context 149 --> $DIR/attr-stmt-expr-attr-bad.rs:43:38 150 | 151LL | #[cfg(FALSE)] fn e() { let _ = if 0 {#![attr]}; } 152 | ^^^^^^^^ 153 | 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. 155 156error: expected one of `.`, `;`, `?`, `else`, or an operator, found `#` 157 --> $DIR/attr-stmt-expr-attr-bad.rs:45:40 158 | 159LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} #[attr] else {}; } 160 | ^ expected one of `.`, `;`, `?`, `else`, or an operator 161 162error: outer attributes are not allowed on `if` and `else` branches 163 --> $DIR/attr-stmt-expr-attr-bad.rs:47:45 164 | 165LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else #[attr] {}; } 166 | ---- ^^^^^^^ -- the attributes are attached to this branch 167 | | | 168 | | help: remove the attributes 169 | the branch belongs to this `else` 170 171error: an inner attribute is not permitted in this context 172 --> $DIR/attr-stmt-expr-attr-bad.rs:49:46 173 | 174LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else {#![attr]}; } 175 | ^^^^^^^^ 176 | 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. 178 179error: outer attributes are not allowed on `if` and `else` branches 180 --> $DIR/attr-stmt-expr-attr-bad.rs:51:45 181 | 182LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else #[attr] if 0 {}; } 183 | ---- ^^^^^^^ ------- the attributes are attached to this branch 184 | | | 185 | | help: remove the attributes 186 | the branch belongs to this `else` 187 188error: outer attributes are not allowed on `if` and `else` branches 189 --> $DIR/attr-stmt-expr-attr-bad.rs:53:50 190 | 191LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else if 0 #[attr] {}; } 192 | -- ^^^^^^^ -- the attributes are attached to this branch 193 | | | 194 | | help: remove the attributes 195 | the branch belongs to this `if` 196 197error: an inner attribute is not permitted in this context 198 --> $DIR/attr-stmt-expr-attr-bad.rs:55:51 199 | 200LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else if 0 {#![attr]}; } 201 | ^^^^^^^^ 202 | 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. 204 205error: outer attributes are not allowed on `if` and `else` branches 206 --> $DIR/attr-stmt-expr-attr-bad.rs:57:45 207 | 208LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 #[attr] {}; } 209 | -- ^^^^^^^ -- the attributes are attached to this branch 210 | | | 211 | | help: remove the attributes 212 | the branch belongs to this `if` 213 214error: an inner attribute is not permitted in this context 215 --> $DIR/attr-stmt-expr-attr-bad.rs:59:46 216 | 217LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {#![attr]}; } 218 | ^^^^^^^^ 219 | 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. 221 222error: expected one of `.`, `;`, `?`, `else`, or an operator, found `#` 223 --> $DIR/attr-stmt-expr-attr-bad.rs:61:48 224 | 225LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} #[attr] else {}; } 226 | ^ expected one of `.`, `;`, `?`, `else`, or an operator 227 228error: outer attributes are not allowed on `if` and `else` branches 229 --> $DIR/attr-stmt-expr-attr-bad.rs:63:53 230 | 231LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else #[attr] {}; } 232 | ---- ^^^^^^^ -- the attributes are attached to this branch 233 | | | 234 | | help: remove the attributes 235 | the branch belongs to this `else` 236 237error: an inner attribute is not permitted in this context 238 --> $DIR/attr-stmt-expr-attr-bad.rs:65:54 239 | 240LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else {#![attr]}; } 241 | ^^^^^^^^ 242 | 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. 244 245error: outer attributes are not allowed on `if` and `else` branches 246 --> $DIR/attr-stmt-expr-attr-bad.rs:67:53 247 | 248LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else #[attr] if let _ = 0 {}; } 249 | ---- ^^^^^^^ --------------- the attributes are attached to this branch 250 | | | 251 | | help: remove the attributes 252 | the branch belongs to this `else` 253 254error: outer attributes are not allowed on `if` and `else` branches 255 --> $DIR/attr-stmt-expr-attr-bad.rs:69:66 256 | 257LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else if let _ = 0 #[attr] {}; } 258 | -- ^^^^^^^ -- the attributes are attached to this branch 259 | | | 260 | | help: remove the attributes 261 | the branch belongs to this `if` 262 263error: an inner attribute is not permitted in this context 264 --> $DIR/attr-stmt-expr-attr-bad.rs:71:67 265 | 266LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else if let _ = 0 {#![attr]}; } 267 | ^^^^^^^^ 268 | 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. 270 271error: an inner attribute is not permitted following an outer attribute 272 --> $DIR/attr-stmt-expr-attr-bad.rs:74:32 273 | 274LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] let _ = 0; } 275 | ------- ^^^^^^^^ not permitted following an outer attribute 276 | | 277 | previous outer attribute 278 | 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. 280 281error: an inner attribute is not permitted following an outer attribute 282 --> $DIR/attr-stmt-expr-attr-bad.rs:76:32 283 | 284LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] 0; } 285 | ------- ^^^^^^^^ not permitted following an outer attribute 286 | | 287 | previous outer attribute 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:78:32 293 | 294LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] foo!(); } 295 | ------- ^^^^^^^^ not permitted following an outer attribute 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:80:32 303 | 304LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] foo![]; } 305 | ------- ^^^^^^^^ not permitted following an outer attribute 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:82:32 313 | 314LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] foo!{}; } 315 | ------- ^^^^^^^^ not permitted following an outer attribute 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[E0586]: inclusive range with no end 322 --> $DIR/attr-stmt-expr-attr-bad.rs:88:35 323 | 324LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] 10 => () } } 325 | ^^^ help: use `..` instead 326 | 327 = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) 328 329error: expected one of `=>`, `if`, or `|`, found `#` 330 --> $DIR/attr-stmt-expr-attr-bad.rs:88:38 331 | 332LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] 10 => () } } 333 | ^ expected one of `=>`, `if`, or `|` 334 335error[E0586]: inclusive range with no end 336 --> $DIR/attr-stmt-expr-attr-bad.rs:91:35 337 | 338LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] -10 => () } } 339 | ^^^ help: use `..` instead 340 | 341 = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) 342 343error: expected one of `=>`, `if`, or `|`, found `#` 344 --> $DIR/attr-stmt-expr-attr-bad.rs:91:38 345 | 346LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] -10 => () } } 347 | ^ expected one of `=>`, `if`, or `|` 348 349error: unexpected token: `#` 350 --> $DIR/attr-stmt-expr-attr-bad.rs:94:39 351 | 352LL | #[cfg(FALSE)] fn e() { match 0 { 0..=-#[attr] 10 => () } } 353 | ^ 354 355error[E0586]: inclusive range with no end 356 --> $DIR/attr-stmt-expr-attr-bad.rs:96:35 357 | 358LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] FOO => () } } 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:96:38 365 | 366LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] FOO => () } } 367 | ^ expected one of `=>`, `if`, or `|` 368 369error: unexpected token: `#` 370 --> $DIR/attr-stmt-expr-attr-bad.rs:100:34 371 | 372LL | #[cfg(FALSE)] fn e() { let _ = x.#![attr]foo(); } 373 | ^ 374 375error: expected one of `.`, `;`, `?`, or an operator, found `#` 376 --> $DIR/attr-stmt-expr-attr-bad.rs:100:34 377 | 378LL | #[cfg(FALSE)] fn e() { let _ = x.#![attr]foo(); } 379 | ^ expected one of `.`, `;`, `?`, or an operator 380 381error: unexpected token: `#` 382 --> $DIR/attr-stmt-expr-attr-bad.rs:103:34 383 | 384LL | #[cfg(FALSE)] fn e() { let _ = x.#[attr]foo(); } 385 | ^ 386 387error: expected one of `.`, `;`, `?`, or an operator, found `#` 388 --> $DIR/attr-stmt-expr-attr-bad.rs:103:34 389 | 390LL | #[cfg(FALSE)] fn e() { let _ = x.#[attr]foo(); } 391 | ^ expected one of `.`, `;`, `?`, or an operator 392 393error: expected statement after outer attribute 394 --> $DIR/attr-stmt-expr-attr-bad.rs:108:37 395 | 396LL | #[cfg(FALSE)] fn e() { { fn foo() { #[attr]; } } } 397 | ^^^^^^^ 398 399error: expected statement after outer attribute 400 --> $DIR/attr-stmt-expr-attr-bad.rs:110:37 401 | 402LL | #[cfg(FALSE)] fn e() { { fn foo() { #[attr] } } } 403 | ^^^^^^^ 404 405error: aborting due to 53 previous errors 406 407For more information about this error, try `rustc --explain E0586`.