mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-04 11:17:04 +00:00

These tests have expanded beyond the RFC, so rename the directory `rfc-3086-metavar-expr` to `metavar-expressions`. `concat` (which wasn't part of the RFC) now fits in this group, so merge its tests into the `metavar-expressions` directory. Additionally rename some related `issue-*` tests.
17 lines
386 B
Rust
17 lines
386 B
Rust
// Issue: https://github.com/rust-lang/rust/issues/111904
|
|
// Ensure that a trailing `,` is not interpreted as a `0`.
|
|
|
|
#![feature(macro_metavar_expr)]
|
|
|
|
macro_rules! foo {
|
|
( $( $($t:ident),* );* ) => { ${count($t,)} }
|
|
//~^ ERROR `count` followed by a comma must have an associated
|
|
//~| ERROR expected expression, found `$`
|
|
}
|
|
|
|
fn test() {
|
|
foo!(a, a; b, b);
|
|
}
|
|
|
|
fn main() {}
|