about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTyler Mandry <tmandry@gmail.com>2019-11-15 14:44:48 +0100
committerGitHub <noreply@github.com>2019-11-15 14:44:48 +0100
commitc6cdbe9a3e57b3884dc1b759fecabfecc831daf3 (patch)
treeeae89d3a11fe2d4064c8ffaf2f8b81936e5f9e9f
parentc5bb2ec0dd1f6f38117ec0e7e22c077a4b74dc09 (diff)
parented9c5da4db8e3725ee6b2ed7b70511f68e890ca0 (diff)
downloadrust-c6cdbe9a3e57b3884dc1b759fecabfecc831daf3.tar.gz
rust-c6cdbe9a3e57b3884dc1b759fecabfecc831daf3.zip
Rollup merge of #66429 - guanqun:add-unit-test, r=Centril
Add a regression test for #62524

Closes #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
+