@@ -2133,7 +2133,7 @@ async fn file_override_toml_format_install_both_toolchain_and_components() {
2133
2133
cx. config . expect_ok ( & [ "rustup" , "default" , "stable" ] ) . await ;
2134
2134
}
2135
2135
2136
- let cx = cx. with_dist_dir ( Scenario :: ArchivesV2_2015_01_01 ) ;
2136
+ let mut cx = cx. with_dist_dir ( Scenario :: ArchivesV2_2015_01_01 ) ;
2137
2137
cx. config
2138
2138
. expect_stdout_ok ( & [ "rustc" , "--version" ] , "hash-stable-1.1.0" )
2139
2139
. await ;
@@ -2153,6 +2153,9 @@ components = [ "rust-src" ]
2153
2153
)
2154
2154
. unwrap ( ) ;
2155
2155
2156
+ cx. config
2157
+ . expect_ok ( & [ "rustup" , "toolchain" , "install" ] )
2158
+ . await ;
2156
2159
cx. config
2157
2160
. expect_stdout_ok ( & [ "rustc" , "--version" ] , "hash-nightly-1" )
2158
2161
. await ;
@@ -2233,7 +2236,7 @@ components = [ "rust-bongo" ]
2233
2236
2234
2237
cx. config
2235
2238
. expect_stderr_ok (
2236
- & [ "rustc " , "--version " ] ,
2239
+ & [ "rustup " , "toolchain" , "install "] ,
2237
2240
"warn: Force-skipping unavailable component 'rust-bongo" ,
2238
2241
)
2239
2242
. await ;
@@ -2789,7 +2792,7 @@ async fn dont_warn_on_partial_build() {
2789
2792
/// Checks that `rust-toolchain.toml` files are considered
2790
2793
#[ tokio:: test]
2791
2794
async fn rust_toolchain_toml ( ) {
2792
- let cx = CliTestContext :: new ( Scenario :: SimpleV2 ) . await ;
2795
+ let mut cx = CliTestContext :: new ( Scenario :: SimpleV2 ) . await ;
2793
2796
cx. config
2794
2797
. expect_err (
2795
2798
& [ "rustc" , "--version" ] ,
@@ -2800,7 +2803,9 @@ async fn rust_toolchain_toml() {
2800
2803
let cwd = cx. config . current_dir ( ) ;
2801
2804
let toolchain_file = cwd. join ( "rust-toolchain.toml" ) ;
2802
2805
raw:: write_file ( & toolchain_file, "[toolchain]\n channel = \" nightly\" " ) . unwrap ( ) ;
2803
-
2806
+ cx. config
2807
+ . expect_ok ( & [ "rustup" , "toolchain" , "install" ] )
2808
+ . await ;
2804
2809
cx. config
2805
2810
. expect_stdout_ok ( & [ "rustc" , "--version" ] , "hash-nightly-2" )
2806
2811
. await ;
@@ -2831,7 +2836,7 @@ async fn warn_on_duplicate_rust_toolchain_file() {
2831
2836
2832
2837
cx. config
2833
2838
. expect_stderr_ok (
2834
- & [ "rustc " , "--version " ] ,
2839
+ & [ "rustup " , "toolchain" , "install "] ,
2835
2840
& format ! (
2836
2841
"warn: both `{0}` and `{1}` exist. Using `{0}`" ,
2837
2842
toolchain_file_1. canonicalize( ) . unwrap( ) . display( ) ,
0 commit comments