mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-13 05:38:46 +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));
|
assert!(p.at(TYPE_KW));
|
||||||
p.bump();
|
p.bump();
|
||||||
|
|
||||||
p.expect(IDENT);
|
name(p);
|
||||||
|
|
||||||
// test type_item_type_params
|
// test type_item_type_params
|
||||||
// type Result<T> = ();
|
// type Result<T> = ();
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
FILE@[0; 21)
|
FILE@[0; 21)
|
||||||
TYPE_ITEM@[0; 21)
|
TYPE_ITEM@[0; 21)
|
||||||
TYPE_KW@[0; 4)
|
TYPE_KW@[0; 4)
|
||||||
|
NAME@[4; 11)
|
||||||
WHITESPACE@[4; 5)
|
WHITESPACE@[4; 5)
|
||||||
IDENT@[5; 11) "Result"
|
IDENT@[5; 11) "Result"
|
||||||
TYPE_PARAM_LIST@[11; 15)
|
TYPE_PARAM_LIST@[11; 15)
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
FILE@[0; 16)
|
FILE@[0; 16)
|
||||||
TYPE_ITEM@[0; 16)
|
TYPE_ITEM@[0; 16)
|
||||||
TYPE_KW@[0; 4)
|
TYPE_KW@[0; 4)
|
||||||
|
NAME@[4; 9)
|
||||||
WHITESPACE@[4; 5)
|
WHITESPACE@[4; 5)
|
||||||
IDENT@[5; 8) "Foo"
|
IDENT@[5; 8) "Foo"
|
||||||
WHITESPACE@[8; 9)
|
WHITESPACE@[8; 9)
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
FILE@[0; 31)
|
FILE@[0; 31)
|
||||||
TYPE_ITEM@[0; 31)
|
TYPE_ITEM@[0; 31)
|
||||||
TYPE_KW@[0; 4)
|
TYPE_KW@[0; 4)
|
||||||
|
NAME@[4; 9)
|
||||||
WHITESPACE@[4; 5)
|
WHITESPACE@[4; 5)
|
||||||
IDENT@[5; 8) "Foo"
|
IDENT@[5; 8) "Foo"
|
||||||
WHERE_CLAUSE@[8; 25)
|
|
||||||
WHITESPACE@[8; 9)
|
WHITESPACE@[8; 9)
|
||||||
|
WHERE_CLAUSE@[9; 25)
|
||||||
WHERE_KW@[9; 14)
|
WHERE_KW@[9; 14)
|
||||||
WHITESPACE@[14; 15)
|
WHITESPACE@[14; 15)
|
||||||
IDENT@[15; 18) "Foo"
|
IDENT@[15; 18) "Foo"
|
||||||
|
|
Loading…
Reference in a new issue