mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Remember the difference between 'sysroot root' and 'sysroot src root', start looking in there for a rust-analyzer-proc-macro-srv binary
This commit is contained in:
parent
4364531c2f
commit
dadb83282d
5 changed files with 63 additions and 12 deletions
|
@ -75,8 +75,11 @@ fn get_test_path(file: &str) -> PathBuf {
|
|||
|
||||
fn get_fake_sysroot() -> Sysroot {
|
||||
let sysroot_path = get_test_path("fake-sysroot");
|
||||
let sysroot_src_dir = AbsPathBuf::assert(sysroot_path);
|
||||
Sysroot::load(sysroot_src_dir).unwrap()
|
||||
// there's no `libexec/` directory with a `proc-macro-srv` binary in that
|
||||
// fake sysroot, so we give them both the same path:
|
||||
let sysroot_dir = AbsPathBuf::assert(sysroot_path);
|
||||
let sysroot_src_dir = sysroot_dir.clone();
|
||||
Sysroot::load(sysroot_dir, sysroot_src_dir).unwrap()
|
||||
}
|
||||
|
||||
fn rooted_project_json(data: ProjectJsonData) -> ProjectJson {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue