2019-07-29 14:04:32 -05:00
|
|
|
error: `..` patterns are not allowed here
|
|
|
|
--> $DIR/rest-pat-semantic-disallowed.rs:10:13
|
|
|
|
|
|
|
|
|
LL | () => { .. }
|
|
|
|
| ^^
|
|
|
|
...
|
|
|
|
LL | let mk_pat!();
|
|
|
|
| --------- in this macro invocation
|
|
|
|
|
|
|
|
|
= note: only allowed in tuple, tuple struct, and slice patterns
|
2021-02-13 13:52:25 -06:00
|
|
|
= note: this error originates in the macro `mk_pat` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2019-07-29 14:04:32 -05:00
|
|
|
|
|
|
|
error: `..` patterns are not allowed here
|
|
|
|
--> $DIR/rest-pat-semantic-disallowed.rs:18:9
|
|
|
|
|
|
|
|
|
LL | let ..;
|
|
|
|
| ^^
|
|
|
|
|
|
|
|
|
= note: only allowed in tuple, tuple struct, and slice patterns
|
|
|
|
|
|
|
|
error: `..` patterns are not allowed here
|
|
|
|
--> $DIR/rest-pat-semantic-disallowed.rs:21:13
|
|
|
|
|
|
|
|
|
LL | let box ..;
|
|
|
|
| ^^
|
|
|
|
|
|
|
|
|
= note: only allowed in tuple, tuple struct, and slice patterns
|
|
|
|
|
|
|
|
error: `..` patterns are not allowed here
|
|
|
|
--> $DIR/rest-pat-semantic-disallowed.rs:25:13
|
|
|
|
|
|
|
|
|
LL | 1 | .. => {}
|
|
|
|
| ^^
|
|
|
|
|
|
|
|
|
= note: only allowed in tuple, tuple struct, and slice patterns
|
|
|
|
|
|
|
|
error: `..` patterns are not allowed here
|
|
|
|
--> $DIR/rest-pat-semantic-disallowed.rs:29:10
|
|
|
|
|
|
|
|
|
LL | let &..;
|
|
|
|
| ^^
|
|
|
|
|
|
|
|
|
= note: only allowed in tuple, tuple struct, and slice patterns
|
|
|
|
|
|
|
|
error: `..` patterns are not allowed here
|
|
|
|
--> $DIR/rest-pat-semantic-disallowed.rs:30:14
|
|
|
|
|
|
|
|
|
LL | let &mut ..;
|
|
|
|
| ^^
|
|
|
|
|
|
|
|
|
= note: only allowed in tuple, tuple struct, and slice patterns
|
|
|
|
|
|
|
|
error: `..` patterns are not allowed here
|
|
|
|
--> $DIR/rest-pat-semantic-disallowed.rs:33:13
|
|
|
|
|
|
|
|
|
LL | let x @ ..;
|
|
|
|
| ^^
|
|
|
|
|
|
|
|
|
= note: only allowed in tuple, tuple struct, and slice patterns
|
|
|
|
|
|
|
|
error: `..` patterns are not allowed here
|
2019-09-24 13:05:49 -05:00
|
|
|
--> $DIR/rest-pat-semantic-disallowed.rs:35:17
|
2019-07-29 14:04:32 -05:00
|
|
|
|
|
|
|
|
LL | let ref x @ ..;
|
|
|
|
| ^^
|
|
|
|
|
|
|
|
|
= note: only allowed in tuple, tuple struct, and slice patterns
|
|
|
|
|
|
|
|
error: `..` patterns are not allowed here
|
2019-09-24 13:05:49 -05:00
|
|
|
--> $DIR/rest-pat-semantic-disallowed.rs:36:21
|
2019-07-29 14:04:32 -05:00
|
|
|
|
|
|
|
|
LL | let ref mut x @ ..;
|
|
|
|
| ^^
|
|
|
|
|
|
|
|
|
= note: only allowed in tuple, tuple struct, and slice patterns
|
|
|
|
|
|
|
|
error: `..` can only be used once per tuple pattern
|
2019-09-24 13:05:49 -05:00
|
|
|
--> $DIR/rest-pat-semantic-disallowed.rs:43:9
|
2019-07-29 14:04:32 -05:00
|
|
|
|
|
|
|
|
LL | ..,
|
|
|
|
| -- previously used here
|
|
|
|
LL | ..,
|
|
|
|
| ^^ can only be used once per tuple pattern
|
|
|
|
|
|
|
|
error: `..` can only be used once per tuple pattern
|
2019-09-24 13:05:49 -05:00
|
|
|
--> $DIR/rest-pat-semantic-disallowed.rs:44:9
|
2019-07-29 14:04:32 -05:00
|
|
|
|
|
|
|
|
LL | ..,
|
|
|
|
| -- previously used here
|
|
|
|
LL | ..,
|
|
|
|
LL | ..
|
|
|
|
| ^^ can only be used once per tuple pattern
|
|
|
|
|
|
|
|
error: `..` can only be used once per tuple pattern
|
2019-09-24 13:05:49 -05:00
|
|
|
--> $DIR/rest-pat-semantic-disallowed.rs:49:9
|
2019-07-29 14:04:32 -05:00
|
|
|
|
|
|
|
|
LL | ..,
|
|
|
|
| -- previously used here
|
|
|
|
LL | x,
|
|
|
|
LL | ..
|
|
|
|
| ^^ can only be used once per tuple pattern
|
|
|
|
|
|
|
|
error: `..` can only be used once per tuple struct pattern
|
2019-09-24 13:05:49 -05:00
|
|
|
--> $DIR/rest-pat-semantic-disallowed.rs:59:9
|
2019-07-29 14:04:32 -05:00
|
|
|
|
|
|
|
|
LL | ..,
|
|
|
|
| -- previously used here
|
|
|
|
LL | ..,
|
|
|
|
| ^^ can only be used once per tuple struct pattern
|
|
|
|
|
|
|
|
error: `..` can only be used once per tuple struct pattern
|
2019-09-24 13:05:49 -05:00
|
|
|
--> $DIR/rest-pat-semantic-disallowed.rs:60:9
|
2019-07-29 14:04:32 -05:00
|
|
|
|
|
|
|
|
LL | ..,
|
|
|
|
| -- previously used here
|
|
|
|
LL | ..,
|
|
|
|
LL | ..
|
|
|
|
| ^^ can only be used once per tuple struct pattern
|
|
|
|
|
|
|
|
error: `..` can only be used once per tuple struct pattern
|
2019-09-24 13:05:49 -05:00
|
|
|
--> $DIR/rest-pat-semantic-disallowed.rs:65:9
|
2019-07-29 14:04:32 -05:00
|
|
|
|
|
|
|
|
LL | ..,
|
|
|
|
| -- previously used here
|
|
|
|
LL | x,
|
|
|
|
LL | ..
|
|
|
|
| ^^ can only be used once per tuple struct pattern
|
|
|
|
|
|
|
|
error: `..` can only be used once per slice pattern
|
2019-09-24 13:05:49 -05:00
|
|
|
--> $DIR/rest-pat-semantic-disallowed.rs:73:9
|
2019-07-29 14:04:32 -05:00
|
|
|
|
|
|
|
|
LL | ..,
|
|
|
|
| -- previously used here
|
|
|
|
LL | ..,
|
|
|
|
| ^^ can only be used once per slice pattern
|
|
|
|
|
|
|
|
error: `..` can only be used once per slice pattern
|
2019-09-24 13:05:49 -05:00
|
|
|
--> $DIR/rest-pat-semantic-disallowed.rs:74:9
|
2019-07-29 14:04:32 -05:00
|
|
|
|
|
|
|
|
LL | ..,
|
|
|
|
| -- previously used here
|
|
|
|
LL | ..,
|
|
|
|
LL | ..
|
|
|
|
| ^^ can only be used once per slice pattern
|
|
|
|
|
|
|
|
error: `..` can only be used once per slice pattern
|
2019-09-24 13:05:49 -05:00
|
|
|
--> $DIR/rest-pat-semantic-disallowed.rs:78:17
|
2019-07-29 14:04:32 -05:00
|
|
|
|
|
|
|
|
LL | ..,
|
|
|
|
| -- previously used here
|
|
|
|
LL | ref x @ ..,
|
|
|
|
| ^^ can only be used once per slice pattern
|
|
|
|
|
|
|
|
error: `..` can only be used once per slice pattern
|
2019-09-24 13:05:49 -05:00
|
|
|
--> $DIR/rest-pat-semantic-disallowed.rs:79:21
|
2019-07-29 14:04:32 -05:00
|
|
|
|
|
|
|
|
LL | ..,
|
|
|
|
| -- previously used here
|
|
|
|
LL | ref x @ ..,
|
|
|
|
LL | ref mut y @ ..,
|
|
|
|
| ^^ can only be used once per slice pattern
|
|
|
|
|
|
|
|
error: `..` patterns are not allowed here
|
2019-09-24 13:05:49 -05:00
|
|
|
--> $DIR/rest-pat-semantic-disallowed.rs:80:18
|
2019-07-29 14:04:32 -05:00
|
|
|
|
|
|
|
|
LL | (ref z @ ..),
|
|
|
|
| ^^
|
|
|
|
|
|
|
|
|
= note: only allowed in tuple, tuple struct, and slice patterns
|
|
|
|
|
|
|
|
error: `..` can only be used once per slice pattern
|
2019-09-24 13:05:49 -05:00
|
|
|
--> $DIR/rest-pat-semantic-disallowed.rs:81:9
|
2019-07-29 14:04:32 -05:00
|
|
|
|
|
|
|
|
LL | ..,
|
|
|
|
| -- previously used here
|
|
|
|
...
|
|
|
|
LL | ..
|
|
|
|
| ^^ can only be used once per slice pattern
|
|
|
|
|
|
|
|
error: `..` patterns are not allowed here
|
|
|
|
--> $DIR/rest-pat-semantic-disallowed.rs:17:12
|
|
|
|
|
|
|
|
|
LL | fn foo(..: u8) {}
|
|
|
|
| ^^
|
|
|
|
|
|
|
|
|
= note: only allowed in tuple, tuple struct, and slice patterns
|
|
|
|
|
2019-09-24 13:05:49 -05:00
|
|
|
error[E0282]: type annotations needed
|
|
|
|
--> $DIR/rest-pat-semantic-disallowed.rs:33:9
|
|
|
|
|
|
|
|
|
LL | let x @ ..;
|
2022-02-14 06:25:26 -06:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
2022-12-13 13:36:43 -06:00
|
|
|
help: consider giving this pattern a type
|
2022-02-14 06:25:26 -06:00
|
|
|
|
|
2022-12-13 13:36:43 -06:00
|
|
|
LL | let x @ ..: /* Type */;
|
|
|
|
| ++++++++++++
|
2019-09-24 13:05:49 -05:00
|
|
|
|
|
|
|
error: aborting due to 23 previous errors
|
2019-07-29 14:04:32 -05:00
|
|
|
|
2019-09-24 13:05:49 -05:00
|
|
|
For more information about this error, try `rustc --explain E0282`.
|