Update src/librustc_mir/interpret/memory.rs

Co-Authored-By: Ralf Jung <post@ralfj.de>
This commit is contained in:
Oliver Scherer 2019-07-26 17:44:11 +02:00 committed by GitHub
parent 6e04ca7fb6
commit 0cd71678e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -555,7 +555,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'mir, 'tcx, M> {
},
Some(GlobalAlloc::Memory(alloc)) =>
// Need to duplicate the logic here, because the global allocations have
// different associated types than the interpreter-local ones
// different associated types than the interpreter-local ones.
Ok((Size::from_bytes(alloc.bytes.len() as u64), alloc.align)),
Some(GlobalAlloc::Function(_)) => {
if let AllocCheck::Dereferencable = liveness {