@@ -259,6 +259,28 @@ impl Toolchain {
259
259
. map_err ( InstallError :: Download ) ?;
260
260
}
261
261
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
+
262
284
fs:: rename ( tmpdir. into_path ( ) , dest) . map_err ( InstallError :: Move ) ?;
263
285
264
286
Ok ( ( ) )
@@ -412,6 +434,7 @@ pub(crate) struct DownloadParams {
412
434
tmp_dir : PathBuf ,
413
435
install_dir : PathBuf ,
414
436
install_src : bool ,
437
+ install_dev : bool ,
415
438
without_cargo : bool ,
416
439
force_install : bool ,
417
440
}
@@ -437,6 +460,7 @@ impl DownloadParams {
437
460
tmp_dir : cfg. rustup_tmp_path . clone ( ) ,
438
461
install_dir : cfg. toolchains_path . clone ( ) ,
439
462
install_src : cfg. args . with_src ,
463
+ install_dev : cfg. args . with_dev ,
440
464
without_cargo : cfg. args . without_cargo ,
441
465
force_install : cfg. args . force_install ,
442
466
}
0 commit comments