mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-15 08:23:26 +00:00
![]() [`macro_metavar_expr_concat`] Add support for literals Adds support for literals in macro parameters. ```rust macro_rules! with_literal { ($literal:literal) => { const ${concat(FOO, $literal)}: i32 = 1; } } fn main() { with_literal!("_BAR"); assert_eq!(FOO_BAR, 1); } ``` cc #124225 r? ``@petrochenkov`` |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
messages.ftl |