2022-03-09 16:46:23 -03:00
|
|
|
error: unexpected token: $
|
2025-06-23 00:14:23 -05:00
|
|
|
--> $DIR/syntax-errors.rs:9:8
|
2022-03-09 16:46:23 -03:00
|
|
|
|
|
|
|
|
|
LL | ( $$ $a:ident ) => {
|
|
|
|
|
| ^
|
|
|
|
|
|
|
|
|
|
note: `$$` and meta-variable expressions are not allowed inside macro parameter definitions
|
2025-06-23 00:14:23 -05:00
|
|
|
--> $DIR/syntax-errors.rs:9:8
|
2022-03-09 16:46:23 -03:00
|
|
|
|
|
|
|
|
|
LL | ( $$ $a:ident ) => {
|
|
|
|
|
| ^
|
|
|
|
|
|
2025-06-23 00:14:23 -05:00
|
|
|
error: unexpected token: {
|
|
|
|
|
--> $DIR/syntax-errors.rs:15:8
|
|
|
|
|
|
|
|
|
|
|
LL | ( ${ len() } ) => {
|
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
|
|
note: `$$` and meta-variable expressions are not allowed inside macro parameter definitions
|
|
|
|
|
--> $DIR/syntax-errors.rs:15:8
|
|
|
|
|
|
|
|
|
|
|
LL | ( ${ len() } ) => {
|
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
|
|
error: expected one of: `*`, `+`, or `?`
|
|
|
|
|
--> $DIR/syntax-errors.rs:15:8
|
|
|
|
|
|
|
|
|
|
|
LL | ( ${ len() } ) => {
|
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
|
|
error: meta-variables within meta-variable expressions must be referenced using a dollar sign
|
|
|
|
|
--> $DIR/syntax-errors.rs:22:33
|
|
|
|
|
|
|
|
|
|
|
LL | ( $( $i:ident ),* ) => { ${ ignore() } };
|
|
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
|
|
error: only unsuffixes integer literals are supported in meta-variable expressions
|
|
|
|
|
--> $DIR/syntax-errors.rs:27:33
|
|
|
|
|
|
|
|
|
|
|
LL | ( $( $i:ident ),* ) => { ${ index(1u32) } };
|
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
|
error: meta-variable expression parameter must be wrapped in parentheses
|
|
|
|
|
--> $DIR/syntax-errors.rs:32:33
|
|
|
|
|
|
|
|
|
|
|
LL | ( $( $i:ident ),* ) => { ${ count{i} } };
|
|
|
|
|
| ^^^^^
|
|
|
|
|
|
2022-03-09 16:46:23 -03:00
|
|
|
error: unexpected token: a
|
2025-06-23 00:14:23 -05:00
|
|
|
--> $DIR/syntax-errors.rs:44:19
|
2022-03-09 16:46:23 -03:00
|
|
|
|
|
|
|
|
|
LL | ${count() a b c}
|
|
|
|
|
| ^
|
|
|
|
|
|
|
|
|
|
|
note: meta-variable expression must not have trailing tokens
|
2025-06-23 00:14:23 -05:00
|
|
|
--> $DIR/syntax-errors.rs:44:19
|
2022-03-09 16:46:23 -03:00
|
|
|
|
|
|
|
|
|
LL | ${count() a b c}
|
|
|
|
|
| ^
|
|
|
|
|
|
|
|
|
|
error: unexpected token: a
|
2025-06-23 00:14:23 -05:00
|
|
|
--> $DIR/syntax-errors.rs:46:20
|
2022-03-09 16:46:23 -03:00
|
|
|
|
|
2023-12-01 21:19:22 -03:00
|
|
|
LL | ${count($i a b c)}
|
|
|
|
|
| ^
|
2022-03-09 16:46:23 -03:00
|
|
|
|
|
|
|
|
|
note: meta-variable expression must not have trailing tokens
|
2025-06-23 00:14:23 -05:00
|
|
|
--> $DIR/syntax-errors.rs:46:20
|
2022-03-09 16:46:23 -03:00
|
|
|
|
|
2023-12-01 21:19:22 -03:00
|
|
|
LL | ${count($i a b c)}
|
|
|
|
|
| ^
|
2022-03-09 16:46:23 -03:00
|
|
|
|
|
|
|
|
error: unexpected token: a
|
2025-06-23 00:14:23 -05:00
|
|
|
--> $DIR/syntax-errors.rs:48:23
|
2022-03-09 16:46:23 -03:00
|
|
|
|
|
2023-12-01 21:19:22 -03:00
|
|
|
LL | ${count($i, 1 a b c)}
|
|
|
|
|
| ^
|
2022-03-09 16:46:23 -03:00
|
|
|
|
|
|
|
|
|
note: meta-variable expression must not have trailing tokens
|
2025-06-23 00:14:23 -05:00
|
|
|
--> $DIR/syntax-errors.rs:48:23
|
2022-03-09 16:46:23 -03:00
|
|
|
|
|
2023-12-01 21:19:22 -03:00
|
|
|
LL | ${count($i, 1 a b c)}
|
|
|
|
|
| ^
|
2022-03-09 16:46:23 -03:00
|
|
|
|
|
|
|
|
error: unexpected token: a
|
2025-06-23 00:14:23 -05:00
|
|
|
--> $DIR/syntax-errors.rs:50:21
|
2022-03-09 16:46:23 -03:00
|
|
|
|
|
2023-12-01 21:19:22 -03:00
|
|
|
LL | ${count($i) a b c}
|
|
|
|
|
| ^
|
2022-03-09 16:46:23 -03:00
|
|
|
|
|
|
|
|
|
note: meta-variable expression must not have trailing tokens
|
2025-06-23 00:14:23 -05:00
|
|
|
--> $DIR/syntax-errors.rs:50:21
|
2022-03-09 16:46:23 -03:00
|
|
|
|
|
2023-12-01 21:19:22 -03:00
|
|
|
LL | ${count($i) a b c}
|
|
|
|
|
| ^
|
2022-03-09 16:46:23 -03:00
|
|
|
|
|
|
|
|
error: unexpected token: a
|
2025-06-23 00:14:23 -05:00
|
|
|
--> $DIR/syntax-errors.rs:53:22
|
2022-03-09 16:46:23 -03:00
|
|
|
|
|
2023-12-01 21:19:22 -03:00
|
|
|
LL | ${ignore($i) a b c}
|
|
|
|
|
| ^
|
2022-03-09 16:46:23 -03:00
|
|
|
|
|
|
|
|
|
note: meta-variable expression must not have trailing tokens
|
2025-06-23 00:14:23 -05:00
|
|
|
--> $DIR/syntax-errors.rs:53:22
|
2022-03-09 16:46:23 -03:00
|
|
|
|
|
2023-12-01 21:19:22 -03:00
|
|
|
LL | ${ignore($i) a b c}
|
|
|
|
|
| ^
|
2022-03-09 16:46:23 -03:00
|
|
|
|
|
|
|
|
error: unexpected token: a
|
2025-06-23 00:14:23 -05:00
|
|
|
--> $DIR/syntax-errors.rs:55:21
|
2022-03-09 16:46:23 -03:00
|
|
|
|
|
2023-12-01 21:19:22 -03:00
|
|
|
LL | ${ignore($i a b c)}
|
|
|
|
|
| ^
|
2022-03-09 16:46:23 -03:00
|
|
|
|
|
|
|
|
|
note: meta-variable expression must not have trailing tokens
|
2025-06-23 00:14:23 -05:00
|
|
|
--> $DIR/syntax-errors.rs:55:21
|
2022-03-09 16:46:23 -03:00
|
|
|
|
|
2023-12-01 21:19:22 -03:00
|
|
|
LL | ${ignore($i a b c)}
|
|
|
|
|
| ^
|
2022-03-09 16:46:23 -03:00
|
|
|
|
|
|
|
|
error: unexpected token: a
|
2025-06-23 00:14:23 -05:00
|
|
|
--> $DIR/syntax-errors.rs:58:19
|
2022-03-09 16:46:23 -03:00
|
|
|
|
|
|
|
|
|
LL | ${index() a b c}
|
|
|
|
|
| ^
|
|
|
|
|
|
|
|
|
|
|
note: meta-variable expression must not have trailing tokens
|
2025-06-23 00:14:23 -05:00
|
|
|
--> $DIR/syntax-errors.rs:58:19
|
2022-03-09 16:46:23 -03:00
|
|
|
|
|
|
|
|
|
LL | ${index() a b c}
|
|
|
|
|
| ^
|
|
|
|
|
|
|
|
|
|
error: unexpected token: a
|
2025-06-23 00:14:23 -05:00
|
|
|
--> $DIR/syntax-errors.rs:60:19
|
2022-03-09 16:46:23 -03:00
|
|
|
|
|
|
|
|
|
LL | ${index(1 a b c)}
|
|
|
|
|
| ^
|
|
|
|
|
|
|
|
|
|
|
note: meta-variable expression must not have trailing tokens
|
2025-06-23 00:14:23 -05:00
|
|
|
--> $DIR/syntax-errors.rs:60:19
|
2022-03-09 16:46:23 -03:00
|
|
|
|
|
|
|
|
|
LL | ${index(1 a b c)}
|
|
|
|
|
| ^
|
|
|
|
|
|
|
|
|
|
error: unexpected token: a
|
2025-06-23 00:14:23 -05:00
|
|
|
--> $DIR/syntax-errors.rs:63:19
|
2022-03-09 16:46:23 -03:00
|
|
|
|
|
|
|
|
|
LL | ${index() a b c}
|
|
|
|
|
| ^
|
|
|
|
|
|
|
|
|
|
|
note: meta-variable expression must not have trailing tokens
|
2025-06-23 00:14:23 -05:00
|
|
|
--> $DIR/syntax-errors.rs:63:19
|
2022-03-09 16:46:23 -03:00
|
|
|
|
|
|
|
|
|
LL | ${index() a b c}
|
|
|
|
|
| ^
|
|
|
|
|
|
|
|
|
|
error: unexpected token: a
|
2025-06-23 00:14:23 -05:00
|
|
|
--> $DIR/syntax-errors.rs:65:19
|
2022-03-09 16:46:23 -03:00
|
|
|
|
|
|
|
|
|
LL | ${index(1 a b c)}
|
|
|
|
|
| ^
|
|
|
|
|
|
|
|
|
|
|
note: meta-variable expression must not have trailing tokens
|
2025-06-23 00:14:23 -05:00
|
|
|
--> $DIR/syntax-errors.rs:65:19
|
2022-03-09 16:46:23 -03:00
|
|
|
|
|
|
|
|
|
LL | ${index(1 a b c)}
|
|
|
|
|
| ^
|
|
|
|
|
|
|
|
|
|
error: meta-variable expression depth must be a literal
|
2025-06-23 00:14:23 -05:00
|
|
|
--> $DIR/syntax-errors.rs:72:33
|
2022-03-09 16:46:23 -03:00
|
|
|
|
|
|
|
|
|
LL | ( $( $i:ident ),* ) => { ${ index(IDX) } };
|
|
|
|
|
| ^^^^^
|
|
|
|
|
|
2023-12-01 21:19:22 -03:00
|
|
|
error: meta-variables within meta-variable expressions must be referenced using a dollar sign
|
2025-06-23 00:14:23 -05:00
|
|
|
--> $DIR/syntax-errors.rs:78:11
|
2023-12-01 21:19:22 -03:00
|
|
|
|
|
|
|
|
|
LL | ${count(foo)}
|
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
|
error: meta-variables within meta-variable expressions must be referenced using a dollar sign
|
2025-06-23 00:14:23 -05:00
|
|
|
--> $DIR/syntax-errors.rs:85:11
|
2023-12-01 21:19:22 -03:00
|
|
|
|
|
|
|
|
|
LL | ${ignore(bar)}
|
|
|
|
|
| ^^^^^^
|
|
|
|
|
|
2022-03-09 16:46:23 -03:00
|
|
|
error: unrecognized meta-variable expression
|
2025-06-23 00:14:23 -05:00
|
|
|
--> $DIR/syntax-errors.rs:91:33
|
2022-03-09 16:46:23 -03:00
|
|
|
|
|
|
|
|
|
LL | ( $( $i:ident ),* ) => { ${ aaaaaaaaaaaaaa(i) } };
|
2024-05-10 12:12:39 -07:00
|
|
|
| ^^^^^^^^^^^^^^ help: supported expressions are count, ignore, index and len
|
|
|
|
|
|
2024-07-06 18:00:04 -03:00
|
|
|
error: expected identifier or string literal
|
2025-06-23 00:14:23 -05:00
|
|
|
--> $DIR/syntax-errors.rs:38:33
|
2024-05-10 12:12:39 -07:00
|
|
|
|
|
|
|
|
|
LL | ( $( $i:ident ),* ) => { ${ {} } };
|
2024-06-13 22:12:26 -03:00
|
|
|
| ^^
|
2022-03-09 16:46:23 -03:00
|
|
|
|
2025-06-23 00:14:23 -05:00
|
|
|
error: aborting due to 21 previous errors
|
2022-03-09 16:46:23 -03:00
|
|
|
|