From fd927ea3a9ea687ba11b01e56579f0287221f55c Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 21 Dec 2018 12:30:28 +0300 Subject: use root-relative paths --- crates/ra_hir/src/module/imp.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'crates/ra_hir/src') diff --git a/crates/ra_hir/src/module/imp.rs b/crates/ra_hir/src/module/imp.rs index f3a346152..748fdb64e 100644 --- a/crates/ra_hir/src/module/imp.rs +++ b/crates/ra_hir/src/module/imp.rs @@ -4,7 +4,7 @@ use ra_syntax::{ ast::{self, NameOwner}, SmolStr, }; -use relative_path::{RelativePathBuf, RelativePath}; +use relative_path::RelativePathBuf; use rustc_hash::{FxHashMap, FxHashSet}; use arrayvec::ArrayVec; use ra_db::{SourceRoot, SourceRootId, Cancelable, FileId}; @@ -184,11 +184,7 @@ fn resolve_submodule( .collect::>(); let problem = if points_to.is_empty() { Some(Problem::UnresolvedModule { - candidate: RelativePath::new("../").join(&if is_dir_owner { - file_mod - } else { - file_dir_mod - }), + candidate: if is_dir_owner { file_mod } else { file_dir_mod }, }) } else { None -- cgit v1.2.3