File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 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;
3030use tracing:: { debug, info, warn} ;
3131
3232const USER_AGENT : & str = "docs.rs builder (https://github.com/rust-lang/docs.rs)" ;
33+ const COMPONENTS : & [ & str ] = & [ "llvm-tools-preview" , "rustc-dev" , "rustfmt" ] ;
3334const DUMMY_CRATE_NAME : & str = "empty-library" ;
3435const DUMMY_CRATE_VERSION : & str = "1.0.0" ;
3536
@@ -188,9 +189,11 @@ impl RustwideBuilder {
188189 // if `rustfmt` is not available in the newer version
189190 // NOTE: this ignores the error so that you can still run a build without rustfmt.
190191 // 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+ }
194197 }
195198
196199 self . rustc_version = self . detect_rustc_version ( ) ?;
You can’t perform that action at this time.
0 commit comments