From be0f1d5ca6b06c1842e668071318a91aafaad42d Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Fri, 2 Jul 2021 01:38:49 +0200 Subject: [PATCH] sysroot: add proc_macro -> std dependency edge --- crates/project_model/src/sysroot.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/project_model/src/sysroot.rs b/crates/project_model/src/sysroot.rs index 006263da8f..39c2eefe62 100644 --- a/crates/project_model/src/sysroot.rs +++ b/crates/project_model/src/sysroot.rs @@ -98,6 +98,12 @@ impl Sysroot { } } + if let Some(proc_macro) = sysroot.by_name("proc_macro") { + if let Some(std) = sysroot.by_name("std") { + sysroot.crates[proc_macro].deps.push(std); + } + } + if sysroot.by_name("core").is_none() { let var_note = if env::var_os("RUST_SRC_PATH").is_some() { " (`RUST_SRC_PATH` might be incorrect, try unsetting it)"