@@ -942,13 +942,15 @@ where
942
942
Ok ( ( ) )
943
943
}
944
944
945
- walk_dir ( "rust/tests/ui" , dir_handling, file_handling) ?;
946
- let file = "rust/tests/ui/consts/const_cmp_type_id.rs" ;
947
- std:: fs:: remove_file ( file)
948
- . map_err ( |error| format ! ( "Failed to remove `{}`: {:?}" , file, error) ) ?;
949
- let file = "rust/tests/ui/consts/issue-73976-monomorphic.rs" ;
950
- std:: fs:: remove_file ( file)
951
- . map_err ( |error| format ! ( "Failed to remove `{}`: {:?}" , file, error) ) ?;
945
+ let rust_path = Path :: new ( "rust" ) ;
946
+
947
+ walk_dir ( rust_path. join ( "tests/ui" ) , dir_handling, file_handling) ?;
948
+ let file = rust_path. join ( "tests/ui/consts/const_cmp_type_id.rs" ) ;
949
+ std:: fs:: remove_file ( & file)
950
+ . map_err ( |error| format ! ( "Failed to remove `{}`: {:?}" , file. display( ) , error) ) ?;
951
+ let file = rust_path. join ( "tests/ui/consts/issue-73976-monomorphic.rs" ) ;
952
+ std:: fs:: remove_file ( & file)
953
+ . map_err ( |error| format ! ( "Failed to remove `{}`: {:?}" , file. display( ) , error) ) ?;
952
954
953
955
if !callback ( ) ? {
954
956
// FIXME: create a function "display_if_not_quiet" or something along the line.
@@ -976,7 +978,7 @@ where
976
978
& "-path" ,
977
979
& "*/auxiliary/*" ,
978
980
] ,
979
- Some ( Path :: new ( "rust" ) ) ,
981
+ Some ( rust_path ) ,
980
982
) ?
981
983
. stdout ,
982
984
)
@@ -997,8 +999,10 @@ where
997
999
if pos >= start && pos <= end {
998
1000
continue ;
999
1001
}
1000
- std:: fs:: remove_file ( path)
1001
- . map_err ( |error| format ! ( "Failed to remove `{}`: {:?}" , path, error) ) ?;
1002
+ let test_path = rust_path. join ( path) ;
1003
+ std:: fs:: remove_file ( & test_path) . map_err ( |error| {
1004
+ format ! ( "Failed to remove `{}`: {:?}" , test_path. display( ) , error)
1005
+ } ) ?;
1002
1006
}
1003
1007
}
1004
1008
@@ -1020,7 +1024,7 @@ where
1020
1024
& "--rustc-args" ,
1021
1025
& rustc_args,
1022
1026
] ,
1023
- Some ( Path :: new ( "rust" ) ) ,
1027
+ Some ( rust_path ) ,
1024
1028
Some ( & env) ,
1025
1029
) ?;
1026
1030
Ok ( ( ) )
0 commit comments