From 86993310143c1347db6308a66c1f31a7a5644f56 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Mon, 5 Oct 2020 17:41:49 +0200 Subject: Make ImportPrefix a configuration option --- crates/hir/src/code_model.rs | 3 ++- crates/hir/src/lib.rs | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'crates/hir') diff --git a/crates/hir/src/code_model.rs b/crates/hir/src/code_model.rs index 5f35d9d3c..a445a97b3 100644 --- a/crates/hir/src/code_model.rs +++ b/crates/hir/src/code_model.rs @@ -391,8 +391,9 @@ impl Module { self, db: &dyn DefDatabase, item: impl Into, + prefix_kind: PrefixKind, ) -> Option { - hir_def::find_path::find_path_prefixed(db, item.into(), self.into(), PrefixKind::Plain) + hir_def::find_path::find_path_prefixed(db, item.into(), self.into(), prefix_kind) } } diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index b9d9c7e25..87084fa13 100644 --- a/crates/hir/src/lib.rs +++ b/crates/hir/src/lib.rs @@ -48,6 +48,7 @@ pub use hir_def::{ body::scope::ExprScopes, builtin_type::BuiltinType, docs::Documentation, + find_path::PrefixKind, item_scope::ItemInNs, nameres::ModuleSource, path::ModPath, -- cgit v1.2.3