mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
Item is a Stmt
This commit is contained in:
parent
a7ca6583fb
commit
d4d986c7f8
6 changed files with 36 additions and 15 deletions
|
@ -694,6 +694,9 @@ fn extract_struct_trait(node: &mut AstNodeSrc, trait_name: &str, methods: &[&str
|
|||
|
||||
fn extract_enum_traits(ast: &mut AstSrc) {
|
||||
for enm in &mut ast.enums {
|
||||
if enm.name == "Stmt" {
|
||||
continue;
|
||||
}
|
||||
let nodes = &ast.nodes;
|
||||
let mut variant_traits = enm
|
||||
.variants
|
||||
|
|
|
@ -197,6 +197,7 @@ Attr =
|
|||
Stmt =
|
||||
LetStmt
|
||||
| ExprStmt
|
||||
| Item
|
||||
|
||||
LetStmt =
|
||||
Attr* 'let' Pat (':' Type)?
|
||||
|
@ -316,7 +317,6 @@ Label =
|
|||
BlockExpr =
|
||||
Attr* Label
|
||||
'{'
|
||||
Item*
|
||||
statements:Stmt*
|
||||
Expr?
|
||||
'}'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue