mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
Improve const generics parsing
- Handle const generics type args - Fix issue with const generic as first parameter in trait impl
This commit is contained in:
parent
c92a090f49
commit
ce1b34fd59
9 changed files with 123 additions and 21 deletions
|
@ -206,6 +206,7 @@ pub(crate) const KINDS_SRC: KindsSrc = KindsSrc {
|
|||
"LIFETIME_ARG",
|
||||
"TYPE_ARG",
|
||||
"ASSOC_TYPE_ARG",
|
||||
"CONST_ARG",
|
||||
"PARAM_LIST",
|
||||
"PARAM",
|
||||
"SELF_PARAM",
|
||||
|
@ -511,10 +512,12 @@ pub(crate) const AST_SRC: AstSrc = AstSrc {
|
|||
type_args: [TypeArg],
|
||||
lifetime_args: [LifetimeArg],
|
||||
assoc_type_args: [AssocTypeArg],
|
||||
const_arg: [ConstArg],
|
||||
}
|
||||
struct TypeArg { TypeRef }
|
||||
struct AssocTypeArg { NameRef, TypeRef }
|
||||
struct LifetimeArg {}
|
||||
struct ConstArg { Literal, BlockExpr }
|
||||
|
||||
struct MacroItems: ModuleItemOwner, FnDefOwner { }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue