mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
Remove hir::Expr::MacroStmts
This hir expression isn't needed and only existed as it was simpler to deal with at first as it gave us a direct mapping for the ast version of the same construct. This PR removes it, properly handling the statements that are introduced by macro call expressions.
This commit is contained in:
parent
d9e22079c4
commit
192a79c235
12 changed files with 88 additions and 110 deletions
|
@ -969,7 +969,7 @@ impl ExpandTo {
|
|||
if parent.kind() == MACRO_EXPR
|
||||
&& parent
|
||||
.parent()
|
||||
.map_or(true, |p| matches!(p.kind(), EXPR_STMT | STMT_LIST | MACRO_STMTS))
|
||||
.map_or(false, |p| matches!(p.kind(), EXPR_STMT | STMT_LIST | MACRO_STMTS))
|
||||
{
|
||||
return ExpandTo::Statements;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue