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) }