add cast kind of from_exposed_addr (int-to-ptr casts)

This commit is contained in:
Ralf Jung 2022-06-02 09:05:37 -04:00
parent 86092a77b3
commit 0600de4d12

View file

@ -131,7 +131,12 @@ fn check_rvalue<'tcx>(
Rvalue::Cast(CastKind::Misc, operand, _) => {
check_operand(tcx, operand, span, body)
},
Rvalue::Cast(CastKind::Pointer(PointerCast::MutToConstPointer | PointerCast::ArrayToPointer), operand, _) => {
Rvalue::Cast(
CastKind::PointerFromExposedAddress
| CastKind::Pointer(PointerCast::MutToConstPointer | PointerCast::ArrayToPointer),
operand,
_
) => {
check_operand(tcx, operand, span, body)
},
Rvalue::Cast(