aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/module
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-12-21 09:30:28 +0000
committerAleksey Kladov <[email protected]>2018-12-21 09:30:28 +0000
commitfd927ea3a9ea687ba11b01e56579f0287221f55c (patch)
treec4a7a0dae2ccbc6b6d987faca8002a22d0253382 /crates/ra_hir/src/module
parentb5b44659a42cf982590519317ede9ead354f9c4e (diff)
use root-relative paths
Diffstat (limited to 'crates/ra_hir/src/module')
-rw-r--r--crates/ra_hir/src/module/imp.rs8
1 files changed, 2 insertions, 6 deletions
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::{
4 ast::{self, NameOwner}, 4 ast::{self, NameOwner},
5 SmolStr, 5 SmolStr,
6}; 6};
7use relative_path::{RelativePathBuf, RelativePath}; 7use relative_path::RelativePathBuf;
8use rustc_hash::{FxHashMap, FxHashSet}; 8use rustc_hash::{FxHashMap, FxHashSet};
9use arrayvec::ArrayVec; 9use arrayvec::ArrayVec;
10use ra_db::{SourceRoot, SourceRootId, Cancelable, FileId}; 10use ra_db::{SourceRoot, SourceRootId, Cancelable, FileId};
@@ -184,11 +184,7 @@ fn resolve_submodule(
184 .collect::<Vec<_>>(); 184 .collect::<Vec<_>>();
185 let problem = if points_to.is_empty() { 185 let problem = if points_to.is_empty() {
186 Some(Problem::UnresolvedModule { 186 Some(Problem::UnresolvedModule {
187 candidate: RelativePath::new("../").join(&if is_dir_owner { 187 candidate: if is_dir_owner { file_mod } else { file_dir_mod },
188 file_mod
189 } else {
190 file_dir_mod
191 }),
192 }) 188 })
193 } else { 189 } else {
194 None 190 None