@@ -812,8 +812,8 @@ define_config! {
812812 host: Option <Vec <String >> = "host" ,
813813 target: Option <Vec <String >> = "target" ,
814814 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" ,
817817 rustfmt: Option <PathBuf > = "rustfmt" ,
818818 docs: Option <bool > = "docs" ,
819819 compiler_docs: Option <bool > = "compiler-docs" ,
@@ -1433,7 +1433,7 @@ impl Config {
14331433 if !flags. skip_stage0_validation {
14341434 config. check_stage0_version ( & rustc, "rustc" ) ;
14351435 }
1436- PathBuf :: from ( rustc)
1436+ rustc
14371437 } else {
14381438 config. download_beta_toolchain ( ) ;
14391439 config. out . join ( config. build . triple ) . join ( "stage0/bin/rustc" )
@@ -1443,7 +1443,7 @@ impl Config {
14431443 if !flags. skip_stage0_validation {
14441444 config. check_stage0_version ( & cargo, "cargo" ) ;
14451445 }
1446- PathBuf :: from ( cargo)
1446+ cargo
14471447 } else {
14481448 config. download_beta_toolchain ( ) ;
14491449 config. out . join ( config. build . triple ) . join ( "stage0/bin/cargo" )
@@ -2305,7 +2305,7 @@ impl Config {
23052305 }
23062306
23072307 // 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 ) {
23092309 if self . dry_run ( ) {
23102310 return ;
23112311 }
@@ -2316,7 +2316,8 @@ impl Config {
23162316 let stage0_name = stage0_output. next ( ) . unwrap ( ) ;
23172317 if stage0_name != component_name {
23182318 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( )
23202321 ) ) ;
23212322 }
23222323
0 commit comments