mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
Set up a search scope when searching for mbe macro references
This commit is contained in:
parent
1efd220f2f
commit
bad4e48672
3 changed files with 56 additions and 4 deletions
|
@ -1150,6 +1150,11 @@ impl MacroDef {
|
|||
// FIXME: wrong for `ProcMacro`
|
||||
matches!(self.id.kind, MacroDefKind::ProcMacro(..) | MacroDefKind::BuiltInDerive(..))
|
||||
}
|
||||
|
||||
/// Indicate it is a declarative macro
|
||||
pub fn is_declarative(&self) -> bool {
|
||||
matches!(self.id.kind, MacroDefKind::Declarative(..))
|
||||
}
|
||||
}
|
||||
|
||||
/// Invariant: `inner.as_assoc_item(db).is_some()`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue