Skip to content
Permalink
Browse files

Update src/librustc_mir/interpret/place.rs

Co-Authored-By: Ralf Jung <post@ralfj.de>
  • Loading branch information
oli-obk and RalfJung committed Jan 9, 2020
1 parent d0b24e5 commit e632940a41fe6d65bd677da85d87046dc5da5022
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/librustc_mir/interpret/place.rs
@@ -182,6 +182,7 @@ impl<'tcx, Tag> MPlaceTy<'tcx, Tag> {
pub fn dangling(layout: TyLayout<'tcx>, cx: &impl HasDataLayout) -> Self {
let align = layout.align.abi;
let ptr = Scalar::from_uint(align.bytes(), cx.pointer_size());
// `Poison` this to make sure that the pointer value `ptr` is never observable by the program.
MPlaceTy { mplace: MemPlace { ptr, align, meta: MemPlaceMeta::Poison }, layout }
}

0 comments on commit e632940

Please sign in to comment.
You can’t perform that action at this time.