move assert_unsafe_preconditions to its own file

These macros and functions are not intrinsics, after all.
This commit is contained in:
Ralf Jung 2024-03-17 10:12:25 +01:00
parent e5ece90f64
commit 5919b26d33

View File

@ -174,7 +174,7 @@ fn check_rvalue<'tcx>(
)) ))
} }
}, },
Rvalue::NullaryOp(NullOp::SizeOf | NullOp::AlignOf | NullOp::OffsetOf(_) | NullOp::UbCheck(_), _) Rvalue::NullaryOp(NullOp::SizeOf | NullOp::AlignOf | NullOp::OffsetOf(_) | NullOp::UbChecks, _)
| Rvalue::ShallowInitBox(_, _) => Ok(()), | Rvalue::ShallowInitBox(_, _) => Ok(()),
Rvalue::UnaryOp(_, operand) => { Rvalue::UnaryOp(_, operand) => {
let ty = operand.ty(body, tcx); let ty = operand.ty(body, tcx);