Skip to content

Commit

Permalink
Update src/librustc_mir/interpret/memory.rs
Browse files Browse the repository at this point in the history
Co-Authored-By: Ralf Jung <post@ralfj.de>
  • Loading branch information
oli-obk and RalfJung committed Jul 26, 2019
1 parent 796e7a8 commit 6e04ca7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc_mir/interpret/memory.rs
Expand Up @@ -548,7 +548,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'mir, 'tcx, M> {
let alloc = self.tcx.alloc_map.lock().get(id);
match alloc {
Some(GlobalAlloc::Static(did)) => {
// Use size and align of the type
// Use size and align of the type.
let ty = self.tcx.type_of(did);
let layout = self.tcx.layout_of(ParamEnv::empty().and(ty)).unwrap();
Ok((layout.size, layout.align.abi))
Expand Down

0 comments on commit 6e04ca7

Please sign in to comment.