summaryrefslogtreecommitdiffstats
path: root/tests/ui/macros/bad-concat.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/macros/bad-concat.rs')
-rw-r--r--tests/ui/macros/bad-concat.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/ui/macros/bad-concat.rs b/tests/ui/macros/bad-concat.rs
new file mode 100644
index 000000000..263cd074d
--- /dev/null
+++ b/tests/ui/macros/bad-concat.rs
@@ -0,0 +1,8 @@
+fn main() {
+ let x: u32 = 42;
+ let y: f64 = 3.14;
+ let z = "foo";
+ let _ = concat!(x, y, z, "bar");
+ //~^ ERROR expected a literal
+ //~| NOTE only literals
+}