@@ -812,8 +812,8 @@ define_config! {
812
812
host: Option <Vec <String >> = "host" ,
813
813
target: Option <Vec <String >> = "target" ,
814
814
build_dir: Option <String > = "build-dir" ,
815
- cargo: Option <String > = "cargo" ,
816
- rustc: Option <String > = "rustc" ,
815
+ cargo: Option <PathBuf > = "cargo" ,
816
+ rustc: Option <PathBuf > = "rustc" ,
817
817
rustfmt: Option <PathBuf > = "rustfmt" ,
818
818
docs: Option <bool > = "docs" ,
819
819
compiler_docs: Option <bool > = "compiler-docs" ,
@@ -1433,7 +1433,7 @@ impl Config {
1433
1433
if !flags. skip_stage0_validation {
1434
1434
config. check_stage0_version ( & rustc, "rustc" ) ;
1435
1435
}
1436
- PathBuf :: from ( rustc)
1436
+ rustc
1437
1437
} else {
1438
1438
config. download_beta_toolchain ( ) ;
1439
1439
config. out . join ( config. build . triple ) . join ( "stage0/bin/rustc" )
@@ -1443,7 +1443,7 @@ impl Config {
1443
1443
if !flags. skip_stage0_validation {
1444
1444
config. check_stage0_version ( & cargo, "cargo" ) ;
1445
1445
}
1446
- PathBuf :: from ( cargo)
1446
+ cargo
1447
1447
} else {
1448
1448
config. download_beta_toolchain ( ) ;
1449
1449
config. out . join ( config. build . triple ) . join ( "stage0/bin/cargo" )
@@ -2305,7 +2305,7 @@ impl Config {
2305
2305
}
2306
2306
2307
2307
// check rustc/cargo version is same or lower with 1 apart from the building one
2308
- pub fn check_stage0_version ( & self , program_path : & str , component_name : & ' static str ) {
2308
+ pub fn check_stage0_version ( & self , program_path : & Path , component_name : & ' static str ) {
2309
2309
if self . dry_run ( ) {
2310
2310
return ;
2311
2311
}
@@ -2316,7 +2316,8 @@ impl Config {
2316
2316
let stage0_name = stage0_output. next ( ) . unwrap ( ) ;
2317
2317
if stage0_name != component_name {
2318
2318
fail ( & format ! (
2319
- "Expected to find {component_name} at {program_path} but it claims to be {stage0_name}"
2319
+ "Expected to find {component_name} at {} but it claims to be {stage0_name}" ,
2320
+ program_path. display( )
2320
2321
) ) ;
2321
2322
}
2322
2323
0 commit comments