Skip to content

Commit

Permalink
Rollup merge of #108212 - KittyBorgX:master, r=jyn514
Browse files Browse the repository at this point in the history
Download rustfmt regardless of rustc being set in config.toml

Fixes #81155

cc : #108210 for exact error details
  • Loading branch information
GuillaumeGomez authored Feb 19, 2023
2 parents d2aef58 + cd3d4fc commit 24d907a
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/bootstrap/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1315,15 +1315,6 @@ impl Config {
} else {
RustfmtState::Unavailable
};
} else {
// If using a system toolchain for bootstrapping, see if that has rustfmt available.
let host = config.build;
let rustfmt_path = config.initial_rustc.with_file_name(exe("rustfmt", host));
let bin_root = config.out.join(host.triple).join("stage0");
if !rustfmt_path.starts_with(&bin_root) {
// Using a system-provided toolchain; we shouldn't download rustfmt.
*config.initial_rustfmt.borrow_mut() = RustfmtState::SystemToolchain(rustfmt_path);
}
}

// Now that we've reached the end of our configuration, infer the
Expand Down

0 comments on commit 24d907a

Please sign in to comment.