diff options
Diffstat (limited to 'tests/ui/macros/macro-metavar-expr-concat/empty-input.rs')
| -rw-r--r-- | tests/ui/macros/macro-metavar-expr-concat/empty-input.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/macros/macro-metavar-expr-concat/empty-input.rs b/tests/ui/macros/macro-metavar-expr-concat/empty-input.rs new file mode 100644 index 00000000000..caad63c5f6b --- /dev/null +++ b/tests/ui/macros/macro-metavar-expr-concat/empty-input.rs @@ -0,0 +1,12 @@ +// 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!(); +} |
