about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/rustdoc-js-std/parser-errors.js10
-rw-r--r--tests/ui/parser/issue-107705.rs3
-rw-r--r--tests/ui/parser/issue-107705.stderr10
3 files changed, 23 insertions, 0 deletions
diff --git a/tests/rustdoc-js-std/parser-errors.js b/tests/rustdoc-js-std/parser-errors.js
index 6c5a7770283..98c6f27ca61 100644
--- a/tests/rustdoc-js-std/parser-errors.js
+++ b/tests/rustdoc-js-std/parser-errors.js
@@ -39,6 +39,7 @@ const QUERY = [
     "a!!",
     "mod:a!",
     "a!::a",
+    "a<",
 ];
 
 const PARSED = [
@@ -402,4 +403,13 @@ const PARSED = [
         userQuery: "a!::a",
         error: 'Cannot have associated items in macros',
     },
+    {
+        elems: [],
+        foundElems: 0,
+        original: "a<",
+        returned: [],
+        typeFilter: -1,
+        userQuery: "a<",
+        error: "Unclosed `<`",
+    },
 ];
diff --git a/tests/ui/parser/issue-107705.rs b/tests/ui/parser/issue-107705.rs
new file mode 100644
index 00000000000..b80984fcdb0
--- /dev/null
+++ b/tests/ui/parser/issue-107705.rs
@@ -0,0 +1,3 @@
+// compile-flags: -C debug-assertions
+
+fn f() {a(b:&, //~ ERROR this file contains an unclosed delimiter
diff --git a/tests/ui/parser/issue-107705.stderr b/tests/ui/parser/issue-107705.stderr
new file mode 100644
index 00000000000..d2d61346118
--- /dev/null
+++ b/tests/ui/parser/issue-107705.stderr
@@ -0,0 +1,10 @@
+error: this file contains an unclosed delimiter
+  --> $DIR/issue-107705.rs:3:67
+   |
+LL | fn f() {a(b:&,
+   |        - - unclosed delimiter                                     ^
+   |        |
+   |        unclosed delimiter
+
+error: aborting due to previous error
+