rust/compiler/rustc_expand
Trevor Gross e6f0caf197
Rollup merge of #127542 - c410-f3r:concat-again, r=petrochenkov
[`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``
2024-07-17 19:53:25 -05:00
..
src Rollup merge of #127542 - c410-f3r:concat-again, r=petrochenkov 2024-07-17 19:53:25 -05:00
Cargo.toml Move some tests from rustc_expand to rustc_parse. 2024-05-06 09:06:02 +10:00
messages.ftl delegation: Do not crash on qpaths without a trait 2024-06-22 19:57:19 +03:00