2025-06-19 06:12:22 +00:00
|
|
|
// 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
|
|
|
|
|
}
|
2018-05-02 20:51:39 -04:00
|
|
|
|
|
|
|
|
fn main() {
|
2025-06-19 06:12:22 +00:00
|
|
|
let x = empty!();
|
2018-05-02 20:51:39 -04:00
|
|
|
}
|