mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-10 07:04:22 +00:00
Parse impl const Trait
This commit is contained in:
parent
6105dbfc2e
commit
b26002410b
4 changed files with 31 additions and 2 deletions
4
Cargo.lock
generated
4
Cargo.lock
generated
|
@ -1839,9 +1839,9 @@ checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c"
|
|||
|
||||
[[package]]
|
||||
name = "ungrammar"
|
||||
version = "1.9.2"
|
||||
version = "1.9.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "58a02e2041a872d56354e843e8e86e6b946fc8e7dc32982fcdc335e29eb4cc8b"
|
||||
checksum = "f5901372c0f3a6a1a9d880aef134c8eaf5e54409343637508c0a344270b42d7b"
|
||||
|
||||
[[package]]
|
||||
name = "unicase"
|
||||
|
|
|
@ -40,6 +40,10 @@ pub(super) fn impl_(p: &mut Parser) {
|
|||
type_params::opt_generic_param_list(p);
|
||||
}
|
||||
|
||||
// test impl_def_const
|
||||
// impl const Send for X {}
|
||||
p.eat(T![const]);
|
||||
|
||||
// FIXME: never type
|
||||
// impl ! {}
|
||||
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
SOURCE_FILE@0..25
|
||||
IMPL@0..24
|
||||
IMPL_KW@0..4 "impl"
|
||||
WHITESPACE@4..5 " "
|
||||
CONST_KW@5..10 "const"
|
||||
WHITESPACE@10..11 " "
|
||||
PATH_TYPE@11..15
|
||||
PATH@11..15
|
||||
PATH_SEGMENT@11..15
|
||||
NAME_REF@11..15
|
||||
IDENT@11..15 "Send"
|
||||
WHITESPACE@15..16 " "
|
||||
FOR_KW@16..19 "for"
|
||||
WHITESPACE@19..20 " "
|
||||
PATH_TYPE@20..21
|
||||
PATH@20..21
|
||||
PATH_SEGMENT@20..21
|
||||
NAME_REF@20..21
|
||||
IDENT@20..21 "X"
|
||||
WHITESPACE@21..22 " "
|
||||
ASSOC_ITEM_LIST@22..24
|
||||
L_CURLY@22..23 "{"
|
||||
R_CURLY@23..24 "}"
|
||||
WHITESPACE@24..25 "\n"
|
|
@ -0,0 +1 @@
|
|||
impl const Send for X {}
|
Loading…
Reference in a new issue