@@ -259,6 +259,28 @@ impl Toolchain {
259259 . map_err ( InstallError :: Download ) ?;
260260 }
261261
262+ if dl_params. install_dev {
263+ let filename = format ! ( "rustc-dev-nightly-{}" , self . host) ;
264+ download_tarball (
265+ & client,
266+ "rustc-dev" ,
267+ & format ! ( "{}/{}/{}.tar" , dl_params. url_prefix, location, filename, ) ,
268+ Some ( & PathBuf :: from ( & filename) . join ( format ! ( "rustc-dev-{}" , self . host) ) ) ,
269+ tmpdir. path ( ) ,
270+ )
271+ . map_err ( InstallError :: Download ) ?;
272+ // llvm-tools-(preview) is currently required for using rustc-dev https://github.com/rust-lang/rust/issues/72594
273+ let filename = format ! ( "llvm-tools-nightly-{}" , self . host) ;
274+ download_tarball (
275+ & client,
276+ "llvm-tools" ,
277+ & format ! ( "{}/{}/{}.tar" , dl_params. url_prefix, location, filename, ) ,
278+ Some ( & PathBuf :: from ( & filename) . join ( "llvm-tools-preview" ) ) ,
279+ tmpdir. path ( ) ,
280+ )
281+ . map_err ( InstallError :: Download ) ?;
282+ }
283+
262284 fs:: rename ( tmpdir. into_path ( ) , dest) . map_err ( InstallError :: Move ) ?;
263285
264286 Ok ( ( ) )
@@ -412,6 +434,7 @@ pub(crate) struct DownloadParams {
412434 tmp_dir : PathBuf ,
413435 install_dir : PathBuf ,
414436 install_src : bool ,
437+ install_dev : bool ,
415438 without_cargo : bool ,
416439 force_install : bool ,
417440}
@@ -437,6 +460,7 @@ impl DownloadParams {
437460 tmp_dir : cfg. rustup_tmp_path . clone ( ) ,
438461 install_dir : cfg. toolchains_path . clone ( ) ,
439462 install_src : cfg. args . with_src ,
463+ install_dev : cfg. args . with_dev ,
440464 without_cargo : cfg. args . without_cargo ,
441465 force_install : cfg. args . force_install ,
442466 }
0 commit comments