mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-14 00:47:18 +00:00
G: use name in types
This commit is contained in:
parent
3aec74bc5b
commit
d68a187eb5
4 changed files with 12 additions and 9 deletions
|
@ -236,7 +236,7 @@ fn type_item(p: &mut Parser) {
|
|||
assert!(p.at(TYPE_KW));
|
||||
p.bump();
|
||||
|
||||
p.expect(IDENT);
|
||||
name(p);
|
||||
|
||||
// test type_item_type_params
|
||||
// type Result<T> = ();
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
FILE@[0; 21)
|
||||
TYPE_ITEM@[0; 21)
|
||||
TYPE_KW@[0; 4)
|
||||
WHITESPACE@[4; 5)
|
||||
IDENT@[5; 11) "Result"
|
||||
NAME@[4; 11)
|
||||
WHITESPACE@[4; 5)
|
||||
IDENT@[5; 11) "Result"
|
||||
TYPE_PARAM_LIST@[11; 15)
|
||||
L_ANGLE@[11; 12)
|
||||
TYPE_PARAM@[12; 13)
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
FILE@[0; 16)
|
||||
TYPE_ITEM@[0; 16)
|
||||
TYPE_KW@[0; 4)
|
||||
WHITESPACE@[4; 5)
|
||||
IDENT@[5; 8) "Foo"
|
||||
WHITESPACE@[8; 9)
|
||||
NAME@[4; 9)
|
||||
WHITESPACE@[4; 5)
|
||||
IDENT@[5; 8) "Foo"
|
||||
WHITESPACE@[8; 9)
|
||||
EQ@[9; 10)
|
||||
WHITESPACE@[10; 11)
|
||||
IDENT@[11; 14) "Bar"
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
FILE@[0; 31)
|
||||
TYPE_ITEM@[0; 31)
|
||||
TYPE_KW@[0; 4)
|
||||
WHITESPACE@[4; 5)
|
||||
IDENT@[5; 8) "Foo"
|
||||
WHERE_CLAUSE@[8; 25)
|
||||
NAME@[4; 9)
|
||||
WHITESPACE@[4; 5)
|
||||
IDENT@[5; 8) "Foo"
|
||||
WHITESPACE@[8; 9)
|
||||
WHERE_CLAUSE@[9; 25)
|
||||
WHERE_KW@[9; 14)
|
||||
WHITESPACE@[14; 15)
|
||||
IDENT@[15; 18) "Foo"
|
||||
|
|
Loading…
Reference in a new issue