Unnamed repository; edit this file 'description' to name the repository.
Merge #10282
10282: fix: don't allow two turbo-fishes in generic arguments r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
bors[bot] 2021-09-19
parent 1c81c36 · parent f99bdf4 · commit e458f66
-rw-r--r--crates/parser/src/grammar/generic_args.rs1
-rw-r--r--crates/syntax/test_data/parser/err/0049_double_fish.rast70
2 files changed, 38 insertions, 33 deletions
diff --git a/crates/parser/src/grammar/generic_args.rs b/crates/parser/src/grammar/generic_args.rs
index 3b9444a6ff..b409baed4d 100644
--- a/crates/parser/src/grammar/generic_args.rs
+++ b/crates/parser/src/grammar/generic_args.rs
@@ -52,7 +52,6 @@ fn generic_arg(p: &mut Parser) {
// NameRef::, this is a path type
path_seg.complete(p, PATH_SEGMENT);
let qual = path.complete(p, PATH);
- opt_generic_arg_list(p, false);
paths::type_path_for_qualifier(p, qual);
path_ty.complete(p, PATH_TYPE);
m.complete(p, TYPE_ARG);
diff --git a/crates/syntax/test_data/parser/err/0049_double_fish.rast b/crates/syntax/test_data/parser/err/0049_double_fish.rast
index aced9884ac..51e36543ac 100644
--- a/crates/syntax/test_data/parser/err/0049_double_fish.rast
+++ b/crates/syntax/test_data/parser/err/0049_double_fish.rast
@@ -11,43 +11,44 @@ [email protected]
@@ -109,6 +110,11 @@ [email protected]
+error 30..30: expected identifier
+error 31..31: expected COMMA
+error 31..31: expected R_ANGLE
+error 31..31: expected SEMICOLON
+error 37..37: expected expression
error 75..75: expected identifier
error 76..76: expected SEMICOLON
error 82..82: expected expression