File tree Expand file tree Collapse file tree 2 files changed +20
-7
lines changed
Expand file tree Collapse file tree 2 files changed +20
-7
lines changed Original file line number Diff line number Diff line change @@ -502,16 +502,14 @@ impl<'a> Cfg<'a> {
502502 & self ,
503503 toolchain : Option < PartialToolchainDesc > ,
504504 ) -> anyhow:: Result < Toolchain < ' _ > > {
505- match toolchain {
505+ let toolchain = match toolchain {
506506 Some ( toolchain) => {
507507 let desc = toolchain. resolve ( & self . get_default_host_triple ( ) ?) ?;
508- Ok ( Toolchain :: new (
509- self ,
510- LocalToolchainName :: Named ( ToolchainName :: Official ( desc) ) ,
511- ) ?)
508+ Some ( LocalToolchainName :: Named ( ToolchainName :: Official ( desc) ) )
512509 }
513- None => Ok ( self . find_or_install_active_toolchain ( false ) . await ?. 0 ) ,
514- }
510+ None => None ,
511+ } ;
512+ self . local_toolchain ( toolchain)
515513 }
516514
517515 pub ( crate ) fn find_active_toolchain (
Original file line number Diff line number Diff line change @@ -2142,6 +2142,12 @@ components = [ "rust-src" ]
21422142 )
21432143 . unwrap ( ) ;
21442144
2145+ cx. config
2146+ . expect_stderr_ok (
2147+ & [ "rustup" , "toolchain" , "install" ] ,
2148+ "info: installing component 'rust-src'" ,
2149+ )
2150+ . await ;
21452151 cx. config
21462152 . expect_stdout_ok ( & [ "rustup" , "component" , "list" ] , "rust-src (installed)" )
21472153 . await ;
@@ -2169,6 +2175,12 @@ targets = [ "arm-linux-androideabi" ]
21692175 )
21702176 . unwrap ( ) ;
21712177
2178+ cx. config
2179+ . expect_stderr_ok (
2180+ & [ "rustup" , "toolchain" , "install" ] ,
2181+ "info: installing component 'rust-std' for 'arm-linux-androideabi'" ,
2182+ )
2183+ . await ;
21722184 cx. config
21732185 . expect_stdout_ok (
21742186 & [ "rustup" , "component" , "list" ] ,
@@ -2225,6 +2237,9 @@ channel = "nightly"
22252237"# ,
22262238 )
22272239 . unwrap ( ) ;
2240+ cx. config
2241+ . expect_ok ( & [ "rustup" , "toolchain" , "install" ] )
2242+ . await ;
22282243 cx. config
22292244 . expect_not_stdout_ok (
22302245 & [ "rustup" , "component" , "list" ] ,
You can’t perform that action at this time.
0 commit comments