@@ -811,8 +811,8 @@ define_config! {
811
811
host: Option <Vec <String >> = "host" ,
812
812
target: Option <Vec <String >> = "target" ,
813
813
build_dir: Option <String > = "build-dir" ,
814
- cargo: Option <String > = "cargo" ,
815
- rustc: Option <String > = "rustc" ,
814
+ cargo: Option <PathBuf > = "cargo" ,
815
+ rustc: Option <PathBuf > = "rustc" ,
816
816
rustfmt: Option <PathBuf > = "rustfmt" ,
817
817
docs: Option <bool > = "docs" ,
818
818
compiler_docs: Option <bool > = "compiler-docs" ,
@@ -1421,7 +1421,7 @@ impl Config {
1421
1421
if !flags. skip_stage0_validation {
1422
1422
config. check_stage0_version ( & rustc, "rustc" ) ;
1423
1423
}
1424
- PathBuf :: from ( rustc)
1424
+ rustc
1425
1425
} else {
1426
1426
config. download_beta_toolchain ( ) ;
1427
1427
config. out . join ( config. build . triple ) . join ( "stage0/bin/rustc" )
@@ -1431,7 +1431,7 @@ impl Config {
1431
1431
if !flags. skip_stage0_validation {
1432
1432
config. check_stage0_version ( & cargo, "cargo" ) ;
1433
1433
}
1434
- PathBuf :: from ( cargo)
1434
+ cargo
1435
1435
} else {
1436
1436
config. download_beta_toolchain ( ) ;
1437
1437
config. out . join ( config. build . triple ) . join ( "stage0/bin/cargo" )
@@ -2292,7 +2292,7 @@ impl Config {
2292
2292
}
2293
2293
2294
2294
// check rustc/cargo version is same or lower with 1 apart from the building one
2295
- pub fn check_stage0_version ( & self , program_path : & str , component_name : & ' static str ) {
2295
+ pub fn check_stage0_version ( & self , program_path : & Path , component_name : & ' static str ) {
2296
2296
if self . dry_run ( ) {
2297
2297
return ;
2298
2298
}
@@ -2303,7 +2303,8 @@ impl Config {
2303
2303
let stage0_name = stage0_output. next ( ) . unwrap ( ) ;
2304
2304
if stage0_name != component_name {
2305
2305
fail ( & format ! (
2306
- "Expected to find {component_name} at {program_path} but it claims to be {stage0_name}"
2306
+ "Expected to find {component_name} at {} but it claims to be {stage0_name}" ,
2307
+ program_path. display( )
2307
2308
) ) ;
2308
2309
}
2309
2310
0 commit comments