@@ -1054,9 +1054,8 @@ fn check_output(
1054
1054
kind : & ' static str ,
1055
1055
config : & TestConfig ,
1056
1056
) -> PathBuf {
1057
- let target = config. config . target . as_ref ( ) . unwrap ( ) ;
1058
1057
let output = normalize ( output, config. comments , config. revision , kind) ;
1059
- let path = output_path ( config, revised ( config. revision , kind) , target ) ;
1058
+ let path = output_path ( config, revised ( config. revision , kind) ) ;
1060
1059
match & config. config . output_conflict_handling {
1061
1060
OutputConflictHandling :: Error => {
1062
1061
let expected_output = std:: fs:: read ( & path) . unwrap_or_default ( ) ;
@@ -1081,28 +1080,15 @@ fn check_output(
1081
1080
path
1082
1081
}
1083
1082
1084
- fn output_path ( config : & TestConfig < ' _ > , kind : String , target : & str ) -> PathBuf {
1083
+ fn output_path ( config : & TestConfig < ' _ > , kind : String ) -> PathBuf {
1085
1084
if config. comments ( ) . any ( |r| r. stderr_per_bitwidth ) {
1086
1085
return config
1087
1086
. path
1088
- . with_extension ( format ! ( "{}bit.{kind}" , get_pointer_width( target ) ) ) ;
1087
+ . with_extension ( format ! ( "{}bit.{kind}" , config . config . get_pointer_width( ) ) ) ;
1089
1088
}
1090
1089
config. path . with_extension ( kind)
1091
1090
}
1092
1091
1093
- // Taken 1:1 from compiletest-rs
1094
- fn get_pointer_width ( triple : & str ) -> u8 {
1095
- if ( triple. contains ( "64" ) && !triple. ends_with ( "gnux32" ) && !triple. ends_with ( "gnu_ilp32" ) )
1096
- || triple. starts_with ( "s390x" )
1097
- {
1098
- 64
1099
- } else if triple. starts_with ( "avr" ) {
1100
- 16
1101
- } else {
1102
- 32
1103
- }
1104
- }
1105
-
1106
1092
fn normalize ( text : & [ u8 ] , comments : & Comments , revision : & str , kind : & ' static str ) -> Vec < u8 > {
1107
1093
let mut text = text. to_owned ( ) ;
1108
1094
0 commit comments