mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-24 04:14:14 +00:00
Fix extract_function with macro arg
This commit is contained in:
parent
535f0726f1
commit
4d005e529b
2 changed files with 69 additions and 28 deletions
|
@ -77,6 +77,11 @@ impl ast::Expr {
|
|||
}
|
||||
// Don't skip subtree since we want to process the expression child next
|
||||
Some(ast::Stmt::ExprStmt(_)) => (),
|
||||
// This might be an expression
|
||||
Some(ast::Stmt::Item(ast::Item::MacroCall(mcall))) => {
|
||||
cb(WalkEvent::Enter(ast::Expr::MacroCall(mcall)));
|
||||
preorder.skip_subtree();
|
||||
}
|
||||
// skip inner items which might have their own expressions
|
||||
Some(ast::Stmt::Item(_)) => preorder.skip_subtree(),
|
||||
None => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue