mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Use dyn cache for Semantics macro resolution
This commit is contained in:
parent
7d40763c88
commit
9349045e09
11 changed files with 44 additions and 41 deletions
|
@ -2755,6 +2755,12 @@ impl Macro {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn is_asm_or_global_asm(&self, db: &dyn HirDatabase) -> bool {
|
||||
matches!(self.id, MacroId::Macro2Id(it) if {
|
||||
matches!(it.lookup(db.upcast()).expander, MacroExpander::BuiltIn(m) if m.is_asm())
|
||||
})
|
||||
}
|
||||
|
||||
pub fn is_attr(&self, db: &dyn HirDatabase) -> bool {
|
||||
matches!(self.kind(db), MacroKind::Attr)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue