From ac64967872507bb921ad69fc50ac3475c1fc26f8 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 8 Jun 2019 14:55:25 +0300 Subject: add a fixme --- crates/ra_hir/src/nameres.rs | 2 ++ crates/ra_hir/src/resolve.rs | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'crates/ra_hir/src') diff --git a/crates/ra_hir/src/nameres.rs b/crates/ra_hir/src/nameres.rs index 8b798d6c9..dc0dd23c9 100644 --- a/crates/ra_hir/src/nameres.rs +++ b/crates/ra_hir/src/nameres.rs @@ -323,6 +323,8 @@ impl CrateDefMap { (res.resolved_def, res.segment_index) } + // FIXME: This seems to do the same work as `resolve_path_with_macro`, but + // using a completely different code path. Seems bad, huh? pub(crate) fn find_macro( &self, db: &impl DefDatabase, diff --git a/crates/ra_hir/src/resolve.rs b/crates/ra_hir/src/resolve.rs index 0f6ee7f47..d6956f45e 100644 --- a/crates/ra_hir/src/resolve.rs +++ b/crates/ra_hir/src/resolve.rs @@ -148,8 +148,8 @@ impl Resolver { PathResult::from_resolution(self.resolve_name(db, &Name::self_param())) } else { let (item_map, module) = match self.module() { - Some(m) => m, - _ => return PathResult::empty(), + Some(it) => it, + None => return PathResult::empty(), }; let (module_res, segment_index) = item_map.resolve_path(db, module, path); -- cgit v1.2.3