mirror of
https://github.com/rust-lang/rust.git
synced 2025-11-24 21:57:41 +00:00
22 lines
561 B
Rust
22 lines
561 B
Rust
// issue: <https://github.com/rust-lang/rust/issues/140479>
|
|
// Ensure a proper compiler error, instead of an ICE occurs.
|
|
// FIXME(macro_metavar_expr_concat): this error message could be improved
|
|
#![feature(macro_metavar_expr_concat)]
|
|
|
|
macro_rules! InRepetition {
|
|
(
|
|
$(
|
|
$($arg:ident),+
|
|
)+
|
|
) => {
|
|
$(
|
|
$(
|
|
${concat(_, $arg)} //~ ERROR nested repetitions with `${concat(...)}` metavariable expressions are not yet supported
|
|
)*
|
|
)*
|
|
};
|
|
}
|
|
InRepetition!(other);
|
|
|
|
fn main() {}
|