aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/impl_block.rs
diff options
context:
space:
mode:
authoruHOOCCOOHu <[email protected]>2019-09-26 18:59:38 +0100
committeruHOOCCOOHu <[email protected]>2019-09-26 19:05:06 +0100
commit2ecb126f5caeb248e333f8559eb1b7dfd34cc744 (patch)
tree02ca4f902520e3d2ec98fe8ce71be8a319bcdc66 /crates/ra_hir/src/impl_block.rs
parent8cd23a4fb8c6a1012ba3e40dd3329a5abaed06b7 (diff)
Support `$crate` in item and expr place.
Diffstat (limited to 'crates/ra_hir/src/impl_block.rs')
-rw-r--r--crates/ra_hir/src/impl_block.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/ra_hir/src/impl_block.rs b/crates/ra_hir/src/impl_block.rs
index d830202bd..c66a1c6a6 100644
--- a/crates/ra_hir/src/impl_block.rs
+++ b/crates/ra_hir/src/impl_block.rs
@@ -218,7 +218,10 @@ impl ModuleImplBlocks {
218 ast::ItemOrMacro::Macro(macro_call) => { 218 ast::ItemOrMacro::Macro(macro_call) => {
219 //FIXME: we should really cut down on the boilerplate required to process a macro 219 //FIXME: we should really cut down on the boilerplate required to process a macro
220 let ast_id = db.ast_id_map(file_id).ast_id(&macro_call).with_file_id(file_id); 220 let ast_id = db.ast_id_map(file_id).ast_id(&macro_call).with_file_id(file_id);
221 if let Some(path) = macro_call.path().and_then(Path::from_ast) { 221 if let Some(path) = macro_call
222 .path()
223 .and_then(|path| Path::from_src(Source { ast: path, file_id }, db))
224 {
222 if let Some(def) = self.module.resolver(db).resolve_path_as_macro(db, &path) 225 if let Some(def) = self.module.resolver(db).resolve_path_as_macro(db, &path)
223 { 226 {
224 let call_id = MacroCallLoc { def: def.id, ast_id }.id(db); 227 let call_id = MacroCallLoc { def: def.id, ast_id }.id(db);