Files
rust/tests/ui/macros/metavar-expressions/concat-unicode-expansion.rs
Trevor Gross cf5eb27910 mbe: Restructure macro_metavar_expr tests
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.
2025-06-23 06:25:55 -05:00

20 lines
432 B
Rust

//@ run-pass
#![feature(macro_metavar_expr_concat)]
macro_rules! turn_to_page {
($ident:ident, $literal:literal, $tt:tt) => {
const ${concat("", $ident)}: i32 = 394;
const ${concat("", $literal)}: i32 = 394;
const ${concat("", $tt)}: i32 = 394;
};
}
fn main() {
turn_to_page!(P1, "Ṕ2", );
assert_eq!(, 394);
assert_eq!(P1, 394);
assert_eq!(2, 394);
}