Distinguish between library and lang UB in assert_unsafe_precondition
This commit is contained in:
parent
1bd73835d3
commit
158b70a1ed
@ -174,7 +174,7 @@ fn check_rvalue<'tcx>(
|
|||||||
))
|
))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Rvalue::NullaryOp(NullOp::SizeOf | NullOp::AlignOf | NullOp::OffsetOf(_) | NullOp::DebugAssertions, _)
|
Rvalue::NullaryOp(NullOp::SizeOf | NullOp::AlignOf | NullOp::OffsetOf(_) | NullOp::UbCheck(_), _)
|
||||||
| Rvalue::ShallowInitBox(_, _) => Ok(()),
|
| Rvalue::ShallowInitBox(_, _) => Ok(()),
|
||||||
Rvalue::UnaryOp(_, operand) => {
|
Rvalue::UnaryOp(_, operand) => {
|
||||||
let ty = operand.ty(body, tcx);
|
let ty = operand.ty(body, tcx);
|
||||||
|
Loading…
Reference in New Issue
Block a user