Distinguish between library and lang UB in assert_unsafe_precondition
This commit is contained in:
parent
46b180ec24
commit
5a93a59fd5
47 changed files with 415 additions and 263 deletions
|
@ -779,7 +779,7 @@ fn codegen_stmt<'tcx>(
|
|||
NullOp::OffsetOf(fields) => {
|
||||
layout.offset_of_subfield(fx, fields.iter()).bytes()
|
||||
}
|
||||
NullOp::DebugAssertions => {
|
||||
NullOp::UbCheck(_) => {
|
||||
let val = fx.tcx.sess.opts.debug_assertions;
|
||||
let val = CValue::by_val(
|
||||
fx.bcx.ins().iconst(types::I8, i64::try_from(val).unwrap()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue