@@ -11,7 +11,7 @@ use crate::{
1111 RustupError , component_for_bin,
1212 config:: { ActiveSource , Cfg } ,
1313 dist:: {
14- DistOptions , PartialToolchainDesc , Profile , ToolchainDesc ,
14+ DistOptions , PartialToolchainDesc , ToolchainDesc ,
1515 config:: Config ,
1616 download:: DownloadCfg ,
1717 manifest:: { Component , ComponentStatus , Manifest } ,
@@ -29,7 +29,7 @@ use super::{
2929/// An official toolchain installed on the local disk
3030#[ derive( Debug ) ]
3131pub ( crate ) struct DistributableToolchain < ' a > {
32- pub ( super ) toolchain : Toolchain < ' a > ,
32+ pub ( crate ) toolchain : Toolchain < ' a > ,
3333 desc : ToolchainDesc ,
3434}
3535
@@ -345,45 +345,6 @@ impl<'a> DistributableToolchain<'a> {
345345 InstallPrefix :: from ( self . toolchain . path ( ) . to_owned ( ) ) . guess_v1_manifest ( )
346346 }
347347
348- /// Update a toolchain with control over the channel behaviour
349- #[ tracing:: instrument( level = "trace" , err( level = "trace" ) , skip_all) ]
350- pub ( crate ) async fn update (
351- & mut self ,
352- components : & [ & str ] ,
353- targets : & [ & str ] ,
354- profile : Profile ,
355- force : bool ,
356- allow_downgrade : bool ,
357- ) -> anyhow:: Result < UpdateStatus > {
358- let mut options = DistOptions :: new (
359- components,
360- targets,
361- & self . desc ,
362- Some ( profile) ,
363- force,
364- self . toolchain . cfg ,
365- ) ?;
366-
367- options. allow_downgrade = allow_downgrade;
368- options. exists = true ;
369- options. old_date_version =
370- // Ignore a missing manifest: we can't report the old version
371- // correctly, and it probably indicates an incomplete install, so do
372- // not report an old rustc version either.
373- self . get_manifest ( )
374- . map ( |m| {
375- (
376- m. date ,
377- // should rustc_version be a free function on a trait?
378- // note that prev_version can be junk if the rustc component is missing ...
379- self . toolchain . rustc_version ( ) ,
380- )
381- } )
382- . ok ( ) ;
383-
384- InstallMethod :: Dist ( options) . install ( ) . await
385- }
386-
387348 pub fn recursion_error ( & self , binary_lossy : String ) -> Result < Infallible , anyhow:: Error > {
388349 let prefix = InstallPrefix :: from ( self . toolchain . path ( ) ) ;
389350 let manifestation = Manifestation :: open ( prefix, self . desc . target . clone ( ) ) ?;
0 commit comments