@@ -834,14 +834,6 @@ fn run_rustfix(
834
834
}
835
835
}
836
836
837
- fn revised ( revision : & str , extension : & str ) -> String {
838
- if revision. is_empty ( ) {
839
- extension. to_string ( )
840
- } else {
841
- format ! ( "{revision}.{extension}" )
842
- }
843
- }
844
-
845
837
fn check_test_result (
846
838
command : Command ,
847
839
mode : Mode ,
@@ -1055,7 +1047,7 @@ fn check_output(
1055
1047
config : & TestConfig ,
1056
1048
) -> PathBuf {
1057
1049
let output = normalize ( output, config. comments , config. revision , kind) ;
1058
- let path = output_path ( config, revised ( config . revision , kind) ) ;
1050
+ let path = output_path ( config, kind) ;
1059
1051
match & config. config . output_conflict_handling {
1060
1052
OutputConflictHandling :: Error => {
1061
1053
let expected_output = std:: fs:: read ( & path) . unwrap_or_default ( ) ;
@@ -1080,13 +1072,14 @@ fn check_output(
1080
1072
path
1081
1073
}
1082
1074
1083
- fn output_path ( config : & TestConfig < ' _ > , kind : String ) -> PathBuf {
1075
+ fn output_path ( config : & TestConfig < ' _ > , kind : & str ) -> PathBuf {
1076
+ let ext = config. extension ( kind) ;
1084
1077
if config. comments ( ) . any ( |r| r. stderr_per_bitwidth ) {
1085
1078
return config
1086
1079
. path
1087
- . with_extension ( format ! ( "{}bit.{kind }" , config. config. get_pointer_width( ) ) ) ;
1080
+ . with_extension ( format ! ( "{}bit.{ext }" , config. config. get_pointer_width( ) ) ) ;
1088
1081
}
1089
- config. path . with_extension ( kind )
1082
+ config. path . with_extension ( ext )
1090
1083
}
1091
1084
1092
1085
fn normalize ( text : & [ u8 ] , comments : & Comments , revision : & str , kind : & ' static str ) -> Vec < u8 > {
0 commit comments