Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-expand/src/declarative.rs')
| -rw-r--r-- | crates/hir-expand/src/declarative.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/crates/hir-expand/src/declarative.rs b/crates/hir-expand/src/declarative.rs index 5ba30f1256..c250bc5270 100644 --- a/crates/hir-expand/src/declarative.rs +++ b/crates/hir-expand/src/declarative.rs @@ -80,13 +80,15 @@ impl DeclarativeMacroExpander { } #[salsa::tracked] -impl DeclarativeMacroExpander { +impl AstId<ast::Macro> { + /// Fetches (and compiles) the expander of this decl macro. #[salsa::tracked(returns(ref))] - pub(crate) fn expander( + pub fn decl_macro_expander( + self, db: &dyn ExpandDatabase, def_crate: Crate, - id: AstId<ast::Macro>, ) -> DeclarativeMacroExpander { + let id = self; let (root, map) = id.file_id.parse_with_map(db); let root = root.syntax_node(); |