Rollup merge of #102557 - Joshument:master, r=jyn514

fix issue with x.py setup running into explicit panic

Fixes problem with [Issue #102555](https://github.com/rust-lang/rust/issues/102555) causing `x.py` setup to fail. Simply requires `rustfmt` be downloaded a little later.
This commit is contained in:
Matthias Krüger 2022-10-02 03:16:40 +02:00 committed by GitHub
commit c6d4421e96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -656,8 +656,6 @@ impl Build {
job::setup(self);
}
// Download rustfmt early so that it can be used in rust-analyzer configs.
let _ = &builder::Builder::new(&self).initial_rustfmt();
self.maybe_update_submodules();
if let Subcommand::Format { check, paths } = &self.config.cmd {
@ -672,6 +670,9 @@ impl Build {
return setup::setup(&self.config, *profile);
}
// Download rustfmt early so that it can be used in rust-analyzer configs.
let _ = &builder::Builder::new(&self).initial_rustfmt();
{
let builder = builder::Builder::new(&self);
if let Some(path) = builder.paths.get(0) {