A MIR transform that checks pointers are aligned

This commit is contained in:
Ben Kimock 2022-11-10 11:37:28 -05:00
parent 58eb9964cc
commit 765c6b865c

View File

@ -169,7 +169,7 @@ fn check_rvalue<'tcx>(
Err((span, "unsizing casts are not allowed in const fn".into()))
}
},
Rvalue::Cast(CastKind::PointerExposeAddress, _, _) => {
Rvalue::Cast(CastKind::PointerExposeAddress | CastKind::PointerAddress, _, _) => {
Err((span, "casting pointers to ints is unstable in const fn".into()))
},
Rvalue::Cast(CastKind::DynStar, _, _) => {