Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions src/bootstrap/src/core/config/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -811,8 +811,8 @@ define_config! {
host: Option<Vec<String>> = "host",
target: Option<Vec<String>> = "target",
build_dir: Option<String> = "build-dir",
cargo: Option<String> = "cargo",
rustc: Option<String> = "rustc",
cargo: Option<PathBuf> = "cargo",
rustc: Option<PathBuf> = "rustc",
rustfmt: Option<PathBuf> = "rustfmt",
docs: Option<bool> = "docs",
compiler_docs: Option<bool> = "compiler-docs",
Expand Down Expand Up @@ -1421,7 +1421,7 @@ impl Config {
if !flags.skip_stage0_validation {
config.check_stage0_version(&rustc, "rustc");
}
PathBuf::from(rustc)
rustc
} else {
config.download_beta_toolchain();
config.out.join(config.build.triple).join("stage0/bin/rustc")
Expand All @@ -1431,7 +1431,7 @@ impl Config {
if !flags.skip_stage0_validation {
config.check_stage0_version(&cargo, "cargo");
}
PathBuf::from(cargo)
cargo
} else {
config.download_beta_toolchain();
config.out.join(config.build.triple).join("stage0/bin/cargo")
Expand Down Expand Up @@ -2292,7 +2292,7 @@ impl Config {
}

// check rustc/cargo version is same or lower with 1 apart from the building one
pub fn check_stage0_version(&self, program_path: &str, component_name: &'static str) {
pub fn check_stage0_version(&self, program_path: &Path, component_name: &'static str) {
if self.dry_run() {
return;
}
Expand All @@ -2303,7 +2303,8 @@ impl Config {
let stage0_name = stage0_output.next().unwrap();
if stage0_name != component_name {
fail(&format!(
"Expected to find {component_name} at {program_path} but it claims to be {stage0_name}"
"Expected to find {component_name} at {} but it claims to be {stage0_name}",
program_path.display()
));
}

Expand Down