From 00bf7706bc2af3629293c6efca92e6226f8b4ff4 Mon Sep 17 00:00:00 2001 From: hi-rustin Date: Fri, 25 Jun 2021 21:59:32 +0800 Subject: [PATCH] Include toolchain specification in error message Signed-off-by: hi-rustin --- src/cargo/core/compiler/standard_lib.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/cargo/core/compiler/standard_lib.rs b/src/cargo/core/compiler/standard_lib.rs index 0c554feb219..6b76a5681be 100644 --- a/src/cargo/core/compiler/standard_lib.rs +++ b/src/cargo/core/compiler/standard_lib.rs @@ -200,11 +200,19 @@ fn detect_sysroot_src_path(target_data: &RustcTargetData<'_>) -> CargoResult { + anyhow::bail!("{} --toolchain {}", msg, rustup_toolchain); + } + Err(_) => { + anyhow::bail!(msg); + } + } } Ok(src_path) }