mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
A MIR transform that checks pointers are aligned
This commit is contained in:
parent
58eb9964cc
commit
765c6b865c
@ -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, _, _) => {
|
||||
|
Loading…
Reference in New Issue
Block a user