diff --git a/src/ld_so/mod.rs b/src/ld_so/mod.rs index 9ea90885c5..0cecd11285 100644 --- a/src/ld_so/mod.rs +++ b/src/ld_so/mod.rs @@ -47,7 +47,7 @@ impl ExpectTlsFree for Result { fn expect_notls(self, msg: &str) -> T { match self { Ok(t) => t, - Err(err) => panic_notls(format_args!("expect failed for Result with err: {:?}", err)), + Err(err) => panic_notls(format_args!("{}: expect failed for Result with err: {:?}", msg, err)), } } } @@ -57,7 +57,7 @@ impl ExpectTlsFree for Option { fn expect_notls(self, msg: &str) -> T { match self { Some(t) => t, - None => panic_notls("expect failed for Option"), + None => panic_notls(format_args!("{}: expect failed for Option", msg)), } } }