Display span in Assert panic message

This commit is contained in:
bjorn3 2019-07-25 14:52:37 +02:00
parent 81fa33da3d
commit 718a5a2e3f

View file

@ -164,7 +164,7 @@ fn codegen_fn_content<'a, 'tcx: 'a>(fx: &mut FunctionCx<'a, 'tcx, impl Backend>)
} else {
fx.bcx.ins().brz(cond, target, &[]);
};
trap_panic(fx, format!("[panic] Assert {:?} failed at {:?}.", msg, bb_data.terminator().source_info.span));
trap_panic(fx, format!("[panic] Assert {:?} at {:?} failed.", msg, bb_data.terminator().source_info.span));
}
TerminatorKind::SwitchInt {