use root-relative paths

This commit is contained in:
Aleksey Kladov 2018-12-21 12:30:28 +03:00
parent b5b44659a4
commit fd927ea3a9
2 changed files with 3 additions and 7 deletions

View file

@ -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::<Vec<_>>();
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