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
|
@ -639,7 +639,7 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
|
|||
NullOp::OffsetOf(fields) => {
|
||||
op_layout.offset_of_subfield(self, fields.iter()).bytes()
|
||||
}
|
||||
NullOp::DebugAssertions => return None,
|
||||
NullOp::UbCheck(_) => return None,
|
||||
};
|
||||
ImmTy::from_scalar(Scalar::from_target_usize(val, self), layout).into()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue