summaryrefslogtreecommitdiffstats
path: root/src/test/ui/parser/unmatched-langle-2.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/parser/unmatched-langle-2.rs')
-rw-r--r--src/test/ui/parser/unmatched-langle-2.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/parser/unmatched-langle-2.rs b/src/test/ui/parser/unmatched-langle-2.rs
new file mode 100644
index 000000000..8de0d7d89
--- /dev/null
+++ b/src/test/ui/parser/unmatched-langle-2.rs
@@ -0,0 +1,15 @@
+// When there are too many opening `<`s, the compiler would previously
+// suggest nonsense if the `<`s were interspersed with other tokens:
+//
+// error: unmatched angle brackets
+// --> unmatched-langle.rs:2:10
+// |
+// 2 | foo::<Ty<<<i32>();
+// | ^^^ help: remove extra angle brackets
+//
+// This test makes sure that this is no longer happening.
+
+fn main() {
+ foo::<Ty<<<i32>();
+ //~^ ERROR: expected `::`, found `(`
+}