Skip to content

Commit 10882a7

Browse files
committed
Display span in Assert panic message
1 parent b597848 commit 10882a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/base.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ fn codegen_fn_content<'a, 'tcx: 'a>(fx: &mut FunctionCx<'a, 'tcx, impl Backend>)
164164
} else {
165165
fx.bcx.ins().brz(cond, target, &[]);
166166
};
167-
trap_panic(fx, format!("[panic] Assert {:?} failed.", msg));
167+
trap_panic(fx, format!("[panic] Assert {:?} at {:?} failed.", msg, bb_data.terminator().source_info.span));
168168
}
169169

170170
TerminatorKind::SwitchInt {

0 commit comments

Comments
 (0)