mirror of
https://github.com/rust-lang/rust.git
synced 2025-11-02 05:55:42 +00:00
`syntax-errors` currently contains both syntax error tests (which don't need expansion) and tests for incorrect instantiations of the `count` metavariable expression (which do need expansion). Split the expansion-dependent tests to a separate file and remove unneeded invocations from `syntax-errors`, to ensure we are catching these before expansion.
72 lines
2.6 KiB
Plaintext
72 lines
2.6 KiB
Plaintext
error: `count` can not be placed inside the innermost repetition
|
|
--> $DIR/usage-errors.rs:15:24
|
|
|
|
|
LL | ( $i:ident ) => { ${ count($i) } };
|
|
| ^^^^^^^^^^^^^
|
|
|
|
error: `count` can not be placed inside the innermost repetition
|
|
--> $DIR/usage-errors.rs:21:24
|
|
|
|
|
LL | ( $i:ident ) => { ${ count($i) } };
|
|
| ^^^^^^^^^^^^^
|
|
|
|
error: missing `fn` or `struct` for function or struct definition
|
|
--> $DIR/usage-errors.rs:28:30
|
|
|
|
|
LL | ( $( $i:ident ),* ) => { count(i) };
|
|
| ^^^^^
|
|
...
|
|
LL | no_curly__no_rhs_dollar__round !(a, b, c);
|
|
| ----------------------------------------- in this macro invocation
|
|
|
|
|
= note: this error originates in the macro `no_curly__no_rhs_dollar__round` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
help: if you meant to call a macro, try
|
|
|
|
|
LL | ( $( $i:ident ),* ) => { count!(i) };
|
|
| +
|
|
|
|
error: missing `fn` or `struct` for function or struct definition
|
|
--> $DIR/usage-errors.rs:35:23
|
|
|
|
|
LL | ( $i:ident ) => { count(i) };
|
|
| ^^^^^
|
|
...
|
|
LL | no_curly__no_rhs_dollar__no_round !(a);
|
|
| -------------------------------------- in this macro invocation
|
|
|
|
|
= note: this error originates in the macro `no_curly__no_rhs_dollar__no_round` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
help: if you meant to call a macro, try
|
|
|
|
|
LL | ( $i:ident ) => { count!(i) };
|
|
| +
|
|
|
|
error: variable `i` is still repeating at this depth
|
|
--> $DIR/usage-errors.rs:42:36
|
|
|
|
|
LL | ( $( $i:ident ),* ) => { count($i) };
|
|
| ^^
|
|
|
|
error[E0425]: cannot find value `a` in this scope
|
|
--> $DIR/usage-errors.rs:52:49
|
|
|
|
|
LL | ( $i:ident ) => { count($i) };
|
|
| -- due to this macro variable
|
|
...
|
|
LL | const _: u32 = no_curly__rhs_dollar__no_round! (a);
|
|
| ^ not found in this scope
|
|
|
|
error[E0425]: cannot find function `count` in this scope
|
|
--> $DIR/usage-errors.rs:49:23
|
|
|
|
|
LL | ( $i:ident ) => { count($i) };
|
|
| ^^^^^ not found in this scope
|
|
...
|
|
LL | const _: u32 = no_curly__rhs_dollar__no_round! (a);
|
|
| ----------------------------------- in this macro invocation
|
|
|
|
|
= note: this error originates in the macro `no_curly__rhs_dollar__no_round` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error: aborting due to 7 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0425`.
|