rust/tests/ui/issues/issue-50403.rs
Trevor Gross f8ab9343b8 Migrate some tests away from concat-idents
`concat_idents!` is in the process of being removed, but a few things it
is used to test will still be relevant. Migrate these tests to something
other than `concat_idents`.
2025-06-24 10:54:54 +00:00

12 lines
335 B
Rust

// Issue 50403
// Ensure that `concat` can't create empty identifiers
// FIXME(macro_metavar_expr_concat): this error message could be improved
macro_rules! empty {
() => { ${concat()} } //~ ERROR expected identifier or string literal
//~^ERROR expected expression
}
fn main() {
let x = empty!();
}