diff options
author | Edwin Cheng <[email protected]> | 2020-03-23 19:32:06 +0000 |
---|---|---|
committer | Edwin Cheng <[email protected]> | 2020-03-25 11:50:12 +0000 |
commit | 7667aa6033b1a0307279d0a153ce0e90437b0b66 (patch) | |
tree | ddf5a147f4f58ce4b004bc83742e5c4447b5eeef /crates/ra_hir_def/src | |
parent | 519dc15cb149a08f4df6746f1e2cb6cd44e3a252 (diff) |
Refactoring a bit
Diffstat (limited to 'crates/ra_hir_def/src')
-rw-r--r-- | crates/ra_hir_def/src/lib.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/crates/ra_hir_def/src/lib.rs b/crates/ra_hir_def/src/lib.rs index b3e811671..bd32ac20a 100644 --- a/crates/ra_hir_def/src/lib.rs +++ b/crates/ra_hir_def/src/lib.rs | |||
@@ -476,8 +476,11 @@ impl AsMacroCall for AstIdWithPath<ast::ModuleItem> { | |||
476 | ) -> Option<MacroCallId> { | 476 | ) -> Option<MacroCallId> { |
477 | let def = resolver(self.path.clone())?; | 477 | let def = resolver(self.path.clone())?; |
478 | Some( | 478 | Some( |
479 | def.as_lazy_macro(db.upcast(), MacroCallKind::Attr(self.ast_id, self.path.to_string())) | 479 | def.as_lazy_macro( |
480 | .into(), | 480 | db.upcast(), |
481 | MacroCallKind::Attr(self.ast_id, self.path.segments.last()?.to_string()), | ||
482 | ) | ||
483 | .into(), | ||
481 | ) | 484 | ) |
482 | } | 485 | } |
483 | } | 486 | } |