mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 23:25:03 +00:00
Created expand_allowed_builtins, updated expand_macro to call this function
This commit is contained in:
parent
2df806a3a5
commit
020537cd06
2 changed files with 20 additions and 3 deletions
|
@ -111,9 +111,10 @@ fn expand_macro_recur(
|
|||
macro_call: &ast::Item,
|
||||
) -> Option<SyntaxNode> {
|
||||
let expanded = match macro_call {
|
||||
item @ ast::Item::MacroCall(macro_call) => {
|
||||
sema.expand_attr_macro(item).or_else(|| sema.expand(macro_call))?.clone_for_update()
|
||||
}
|
||||
item @ ast::Item::MacroCall(macro_call) => sema
|
||||
.expand_attr_macro(item)
|
||||
.or_else(|| sema.expand_allowed_builtins(macro_call))?
|
||||
.clone_for_update(),
|
||||
item => sema.expand_attr_macro(item)?.clone_for_update(),
|
||||
};
|
||||
expand(sema, expanded)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue