mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
Test Fixture ExplicitRoot + ModuleResolutionRelativePathOutsideRoot.
This commit is contained in:
parent
bf84e4958e
commit
d2d7a4403c
3 changed files with 22 additions and 3 deletions
|
@ -150,6 +150,8 @@ impl ChangeFixture {
|
|||
entry.text.clone()
|
||||
};
|
||||
|
||||
let explicit_root = entry.explicit_root;
|
||||
|
||||
let meta = FileMeta::from(entry);
|
||||
assert!(meta.path.starts_with(&source_root_prefix));
|
||||
|
||||
|
@ -169,7 +171,7 @@ impl ChangeFixture {
|
|||
let dep = CrateName::normalize_dashes(&dep);
|
||||
crate_deps.push((crate_name.clone(), dep))
|
||||
}
|
||||
} else if meta.path == "/main.rs" || meta.path == "/lib.rs" {
|
||||
} else if meta.path == "/main.rs" || meta.path == "/lib.rs" || explicit_root {
|
||||
assert!(default_crate_root.is_none());
|
||||
default_crate_root = Some(file_id);
|
||||
default_cfg = meta.cfg;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue