From e5bcb69e4f88c7536b1039a881816cb8f1c1f867 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 23 Nov 2019 16:39:53 +0300 Subject: Hide ImportId --- crates/ra_ide_api/src/completion/complete_path.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_ide_api/src/completion/complete_path.rs') diff --git a/crates/ra_ide_api/src/completion/complete_path.rs b/crates/ra_ide_api/src/completion/complete_path.rs index 802c7701a..63e25e0bf 100644 --- a/crates/ra_ide_api/src/completion/complete_path.rs +++ b/crates/ra_ide_api/src/completion/complete_path.rs @@ -1,6 +1,6 @@ //! FIXME: write short doc here -use hir::{Adt, Either, PathResolution}; +use hir::{Adt, Either, HasSource, PathResolution}; use ra_syntax::AstNode; use test_utils::tested_by; @@ -27,7 +27,7 @@ pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) { } if Some(module) == ctx.module { if let Some(import) = import { - if let Either::A(use_tree) = module.import_source(ctx.db, import) { + if let Either::A(use_tree) = import.source(ctx.db).value { if use_tree.syntax().text_range().contains_inclusive(ctx.offset) { // for `use self::foo<|>`, don't suggest `foo` as a completion tested_by!(dont_complete_current_use); -- cgit v1.2.3