File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ use std::sync::Arc;
30
30
use tracing:: { debug, info, warn} ;
31
31
32
32
const USER_AGENT : & str = "docs.rs builder (https://github.com/rust-lang/docs.rs)" ;
33
+ const COMPONENTS : & [ & str ] = & [ "llvm-tools-preview" , "rustc-dev" , "rustfmt" ] ;
33
34
const DUMMY_CRATE_NAME : & str = "empty-library" ;
34
35
const DUMMY_CRATE_VERSION : & str = "1.0.0" ;
35
36
@@ -188,9 +189,11 @@ impl RustwideBuilder {
188
189
// if `rustfmt` is not available in the newer version
189
190
// NOTE: this ignores the error so that you can still run a build without rustfmt.
190
191
// This should only happen if you run a build for the first time when rustfmt isn't available.
191
- if let Err ( err) = self . toolchain . add_component ( & self . workspace , "rustfmt" ) {
192
- warn ! ( "failed to install rustfmt: {}" , err) ;
193
- info ! ( "continuing anyway, since this must be the first build" ) ;
192
+ for component in COMPONENTS {
193
+ if let Err ( err) = self . toolchain . add_component ( & self . workspace , component) {
194
+ warn ! ( "failed to install {component}: {err}" ) ;
195
+ info ! ( "continuing anyway, since this must be the first build" ) ;
196
+ }
194
197
}
195
198
196
199
self . rustc_version = self . detect_rustc_version ( ) ?;
You can’t perform that action at this time.
0 commit comments