2025-06-20 16:50:20 -04:00
|
|
|
// Issue: https://github.com/rust-lang/rust/issues/111904
|
|
|
|
|
// Ensure that a trailing `,` is not interpreted as a `0`.
|
|
|
|
|
|
2023-08-17 08:52:37 -03:00
|
|
|
#![feature(macro_metavar_expr)]
|
|
|
|
|
|
|
|
|
|
macro_rules! foo {
|
2023-12-01 21:19:22 -03:00
|
|
|
( $( $($t:ident),* );* ) => { ${count($t,)} }
|
2023-08-17 08:52:37 -03:00
|
|
|
//~^ ERROR `count` followed by a comma must have an associated
|
|
|
|
|
//~| ERROR expected expression, found `$`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn test() {
|
|
|
|
|
foo!(a, a; b, b);
|
|
|
|
|
}
|
|
|
|
|
|
2025-06-20 16:50:20 -04:00
|
|
|
fn main() {}
|