about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuanqun Lu <guanqun.lu@gmail.com>2019-11-15 08:34:34 +0800
committerGuanqun Lu <guanqun.lu@gmail.com>2019-11-15 08:34:34 +0800
commited9c5da4db8e3725ee6b2ed7b70511f68e890ca0 (patch)
tree8f527f306138030ca843f3760a45d62522410d74
parentd63b24ffcc48f44ef09e0369e6516d6f2dec3520 (diff)
downloadrust-ed9c5da4db8e3725ee6b2ed7b70511f68e890ca0.tar.gz
rust-ed9c5da4db8e3725ee6b2ed7b70511f68e890ca0.zip
add a unit test for #62524
-rw-r--r--src/test/ui/parser/issue-62524.rs4
-rw-r--r--src/test/ui/parser/issue-62524.stderr34
2 files changed, 38 insertions, 0 deletions
diff --git a/src/test/ui/parser/issue-62524.rs b/src/test/ui/parser/issue-62524.rs
new file mode 100644
index 00000000000..57de4b87b0f
--- /dev/null
+++ b/src/test/ui/parser/issue-62524.rs
@@ -0,0 +1,4 @@
+// ignore-tidy-trailing-newlines
+// error-pattern: aborting due to 3 previous errors
+y![
+Ϥ,
\ No newline at end of file
diff --git a/src/test/ui/parser/issue-62524.stderr b/src/test/ui/parser/issue-62524.stderr
new file mode 100644
index 00000000000..229768f4959
--- /dev/null
+++ b/src/test/ui/parser/issue-62524.stderr
@@ -0,0 +1,34 @@
+error: this file contains an un-closed delimiter
+  --> $DIR/issue-62524.rs:4:3
+   |
+LL | y![
+   |   - un-closed delimiter
+LL | Ϥ,
+   |   ^
+
+error: macros that expand to items must be delimited with braces or followed by a semicolon
+  --> $DIR/issue-62524.rs:3:3
+   |
+LL |   y![
+   |  ___^
+LL | | Ϥ,
+   | |__^
+   |
+help: change the delimiters to curly braces
+   |
+LL | y!{
+LL | Ϥ}
+   |
+help: add a semicolon
+   |
+LL | Ϥ,;
+   |   ^
+
+error: cannot find macro `y` in this scope
+  --> $DIR/issue-62524.rs:3:1
+   |
+LL | y![
+   | ^
+
+error: aborting due to 3 previous errors
+