@@ -695,7 +695,7 @@ impl<'test> TestCx<'test> {
695
695
}
696
696
697
697
fn run_command_to_procres ( & self , cmd : & mut Command ) -> ProcRes {
698
- let output = cmd. output ( ) . unwrap_or_else ( |_ | panic ! ( "failed to exec `{cmd:?}`" ) ) ;
698
+ let output = cmd. output ( ) . unwrap_or_else ( |e | panic ! ( "failed to exec `{cmd:?}`: {e:?} " ) ) ;
699
699
700
700
let proc_res = ProcRes {
701
701
status : output. status ,
@@ -1216,12 +1216,12 @@ impl<'test> TestCx<'test> {
1216
1216
. arg ( & exe_file)
1217
1217
. arg ( & self . config . adb_test_dir )
1218
1218
. status ( )
1219
- . unwrap_or_else ( |_ | panic ! ( "failed to exec `{:?}`" , adb_path ) ) ;
1219
+ . unwrap_or_else ( |e | panic ! ( "failed to exec `{adb_path :?}`: {e:?}" ) ) ;
1220
1220
1221
1221
Command :: new ( adb_path)
1222
1222
. args ( & [ "forward" , "tcp:5039" , "tcp:5039" ] )
1223
1223
. status ( )
1224
- . unwrap_or_else ( |_ | panic ! ( "failed to exec `{:?}`" , adb_path ) ) ;
1224
+ . unwrap_or_else ( |e | panic ! ( "failed to exec `{adb_path :?}`: {e:?}" ) ) ;
1225
1225
1226
1226
let adb_arg = format ! (
1227
1227
"export LD_LIBRARY_PATH={}; \
@@ -1238,7 +1238,7 @@ impl<'test> TestCx<'test> {
1238
1238
. stdout ( Stdio :: piped ( ) )
1239
1239
. stderr ( Stdio :: inherit ( ) )
1240
1240
. spawn ( )
1241
- . unwrap_or_else ( |_ | panic ! ( "failed to exec `{:?}`" , adb_path ) ) ;
1241
+ . unwrap_or_else ( |e | panic ! ( "failed to exec `{adb_path :?}`: {e:?}" ) ) ;
1242
1242
1243
1243
// Wait for the gdbserver to print out "Listening on port ..."
1244
1244
// at which point we know that it's started and then we can
@@ -1263,7 +1263,7 @@ impl<'test> TestCx<'test> {
1263
1263
let Output { status, stdout, stderr } = Command :: new ( & gdb_path)
1264
1264
. args ( debugger_opts)
1265
1265
. output ( )
1266
- . unwrap_or_else ( |_ | panic ! ( "failed to exec `{:?}`" , gdb_path ) ) ;
1266
+ . unwrap_or_else ( |e | panic ! ( "failed to exec `{gdb_path :?}`: {e:?}" ) ) ;
1267
1267
let cmdline = {
1268
1268
let mut gdb = Command :: new ( & format ! ( "{}-gdb" , self . config. target) ) ;
1269
1269
gdb. args ( debugger_opts) ;
@@ -2277,7 +2277,7 @@ impl<'test> TestCx<'test> {
2277
2277
add_dylib_path ( & mut command, iter:: once ( lib_path) . chain ( aux_path) ) ;
2278
2278
2279
2279
let mut child = disable_error_reporting ( || command. spawn ( ) )
2280
- . unwrap_or_else ( |_ | panic ! ( "failed to exec `{:?}`" , & command ) ) ;
2280
+ . unwrap_or_else ( |e | panic ! ( "failed to exec `{command :?}`: {e:?}" ) ) ;
2281
2281
if let Some ( input) = input {
2282
2282
child. stdin . as_mut ( ) . unwrap ( ) . write_all ( input. as_bytes ( ) ) . unwrap ( ) ;
2283
2283
}
@@ -3838,8 +3838,8 @@ impl<'test> TestCx<'test> {
3838
3838
. open ( coverage_file_path. as_path ( ) )
3839
3839
. expect ( "could not create or open file" ) ;
3840
3840
3841
- if writeln ! ( file, "{}" , self . testpaths. file. display( ) ) . is_err ( ) {
3842
- panic ! ( "couldn't write to {}" , coverage_file_path. display( ) ) ;
3841
+ if let Err ( e ) = writeln ! ( file, "{}" , self . testpaths. file. display( ) ) {
3842
+ panic ! ( "couldn't write to {}: {e:?} " , coverage_file_path. display( ) ) ;
3843
3843
}
3844
3844
}
3845
3845
} else if self . props . run_rustfix {
0 commit comments