diff options
Diffstat (limited to 'crates/ra_hir_expand/src/lib.rs')
-rw-r--r-- | crates/ra_hir_expand/src/lib.rs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/crates/ra_hir_expand/src/lib.rs b/crates/ra_hir_expand/src/lib.rs index f440c073b..5eac2605b 100644 --- a/crates/ra_hir_expand/src/lib.rs +++ b/crates/ra_hir_expand/src/lib.rs | |||
@@ -209,8 +209,13 @@ pub struct MacroDefId { | |||
209 | } | 209 | } |
210 | 210 | ||
211 | impl MacroDefId { | 211 | impl MacroDefId { |
212 | pub fn as_lazy_macro(self, db: &dyn db::AstDatabase, kind: MacroCallKind) -> LazyMacroId { | 212 | pub fn as_lazy_macro( |
213 | db.intern_macro(MacroCallLoc { def: self, kind }) | 213 | self, |
214 | db: &dyn db::AstDatabase, | ||
215 | krate: CrateId, | ||
216 | kind: MacroCallKind, | ||
217 | ) -> LazyMacroId { | ||
218 | db.intern_macro(MacroCallLoc { def: self, krate, kind }) | ||
214 | } | 219 | } |
215 | } | 220 | } |
216 | 221 | ||
@@ -227,6 +232,7 @@ pub enum MacroDefKind { | |||
227 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 232 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
228 | pub struct MacroCallLoc { | 233 | pub struct MacroCallLoc { |
229 | pub(crate) def: MacroDefId, | 234 | pub(crate) def: MacroDefId, |
235 | pub(crate) krate: CrateId, | ||
230 | pub(crate) kind: MacroCallKind, | 236 | pub(crate) kind: MacroCallKind, |
231 | } | 237 | } |
232 | 238 | ||
@@ -274,6 +280,7 @@ pub struct EagerCallLoc { | |||
274 | pub(crate) def: MacroDefId, | 280 | pub(crate) def: MacroDefId, |
275 | pub(crate) fragment: FragmentKind, | 281 | pub(crate) fragment: FragmentKind, |
276 | pub(crate) subtree: Arc<tt::Subtree>, | 282 | pub(crate) subtree: Arc<tt::Subtree>, |
283 | pub(crate) krate: CrateId, | ||
277 | pub(crate) file_id: HirFileId, | 284 | pub(crate) file_id: HirFileId, |
278 | } | 285 | } |
279 | 286 | ||