Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir/src/lib.rs')
| -rw-r--r-- | crates/hir/src/lib.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index 4d758c7df7..fe8a8018db 100644 --- a/crates/hir/src/lib.rs +++ b/crates/hir/src/lib.rs @@ -1716,6 +1716,10 @@ impl MacroDef { MacroKind::Attr | MacroKind::Derive => false, } } + + pub fn is_attr(&self) -> bool { + matches!(self.kind(), MacroKind::Attr) + } } #[derive(Clone, Copy, PartialEq, Eq, Debug, Hash)] |