mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 13:03:31 +00:00
Merge #10282
10282: fix: don't allow two turbo-fishes in generic arguments r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
commit
e458f66214
2 changed files with 38 additions and 33 deletions
|
@ -52,7 +52,6 @@ fn generic_arg(p: &mut Parser) {
|
||||||
// NameRef::, this is a path type
|
// NameRef::, this is a path type
|
||||||
path_seg.complete(p, PATH_SEGMENT);
|
path_seg.complete(p, PATH_SEGMENT);
|
||||||
let qual = path.complete(p, PATH);
|
let qual = path.complete(p, PATH);
|
||||||
opt_generic_arg_list(p, false);
|
|
||||||
paths::type_path_for_qualifier(p, qual);
|
paths::type_path_for_qualifier(p, qual);
|
||||||
path_ty.complete(p, PATH_TYPE);
|
path_ty.complete(p, PATH_TYPE);
|
||||||
m.complete(p, TYPE_ARG);
|
m.complete(p, TYPE_ARG);
|
||||||
|
|
|
@ -11,17 +11,18 @@ SOURCE_FILE@0..90
|
||||||
BLOCK_EXPR@7..40
|
BLOCK_EXPR@7..40
|
||||||
L_CURLY@7..8 "{"
|
L_CURLY@7..8 "{"
|
||||||
WHITESPACE@8..13 "\n "
|
WHITESPACE@8..13 "\n "
|
||||||
EXPR_STMT@13..38
|
EXPR_STMT@13..31
|
||||||
PATH_EXPR@13..37
|
PATH_EXPR@13..31
|
||||||
PATH@13..37
|
PATH@13..31
|
||||||
PATH_SEGMENT@13..37
|
PATH_SEGMENT@13..31
|
||||||
NAME_REF@13..14
|
NAME_REF@13..14
|
||||||
IDENT@13..14 "S"
|
IDENT@13..14 "S"
|
||||||
GENERIC_ARG_LIST@14..37
|
GENERIC_ARG_LIST@14..31
|
||||||
COLON2@14..16 "::"
|
COLON2@14..16 "::"
|
||||||
L_ANGLE@16..17 "<"
|
L_ANGLE@16..17 "<"
|
||||||
TYPE_ARG@17..36
|
TYPE_ARG@17..31
|
||||||
PATH_TYPE@17..36
|
PATH_TYPE@17..31
|
||||||
|
PATH@17..31
|
||||||
PATH@17..28
|
PATH@17..28
|
||||||
PATH_SEGMENT@17..28
|
PATH_SEGMENT@17..28
|
||||||
NAME_REF@17..21
|
NAME_REF@17..21
|
||||||
|
@ -36,17 +37,17 @@ SOURCE_FILE@0..90
|
||||||
NAME_REF@24..27
|
NAME_REF@24..27
|
||||||
IDENT@24..27 "lol"
|
IDENT@24..27 "lol"
|
||||||
R_ANGLE@27..28 ">"
|
R_ANGLE@27..28 ">"
|
||||||
GENERIC_ARG_LIST@28..36
|
|
||||||
COLON2@28..30 "::"
|
COLON2@28..30 "::"
|
||||||
|
ERROR@30..31
|
||||||
L_ANGLE@30..31 "<"
|
L_ANGLE@30..31 "<"
|
||||||
TYPE_ARG@31..35
|
BIN_EXPR@31..38
|
||||||
PATH_TYPE@31..35
|
PATH_EXPR@31..35
|
||||||
PATH@31..35
|
PATH@31..35
|
||||||
PATH_SEGMENT@31..35
|
PATH_SEGMENT@31..35
|
||||||
NAME_REF@31..35
|
NAME_REF@31..35
|
||||||
IDENT@31..35 "nope"
|
IDENT@31..35 "nope"
|
||||||
R_ANGLE@35..36 ">"
|
SHR@35..37 ">>"
|
||||||
R_ANGLE@36..37 ">"
|
ERROR@37..38
|
||||||
SEMICOLON@37..38 ";"
|
SEMICOLON@37..38 ";"
|
||||||
WHITESPACE@38..39 "\n"
|
WHITESPACE@38..39 "\n"
|
||||||
R_CURLY@39..40 "}"
|
R_CURLY@39..40 "}"
|
||||||
|
@ -109,6 +110,11 @@ SOURCE_FILE@0..90
|
||||||
WHITESPACE@87..88 "\n"
|
WHITESPACE@87..88 "\n"
|
||||||
R_CURLY@88..89 "}"
|
R_CURLY@88..89 "}"
|
||||||
WHITESPACE@89..90 "\n"
|
WHITESPACE@89..90 "\n"
|
||||||
|
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 75..75: expected identifier
|
||||||
error 76..76: expected SEMICOLON
|
error 76..76: expected SEMICOLON
|
||||||
error 82..82: expected expression
|
error 82..82: expected expression
|
||||||
|
|
Loading…
Reference in a new issue