summaryrefslogtreecommitdiffstats
path: root/src/librustc_mir/interpret/step.rs
diff options
context:
space:
mode:
authorEduard-Mihai Burtescu <edy.burt@gmail.com>2017-12-17 08:47:22 +0200
committerEduard-Mihai Burtescu <edy.burt@gmail.com>2017-12-17 16:34:54 +0200
commit7dc79cc49b5c134ed3a14005831b9958ae83a555 (patch)
treea8081983b074313f4cc0b268293e9e34d634a45d /src/librustc_mir/interpret/step.rs
parentmiri: use separate Pointer and Align instead of PtrAndAlign. (diff)
downloadgrust-7dc79cc49b5c134ed3a14005831b9958ae83a555.tar.gz
grust-7dc79cc49b5c134ed3a14005831b9958ae83a555.tar.bz2
grust-7dc79cc49b5c134ed3a14005831b9958ae83a555.tar.xz
miri: pass pointer alignments directly instead of contextually.
Diffstat (limited to 'src/librustc_mir/interpret/step.rs')
-rw-r--r--src/librustc_mir/interpret/step.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_mir/interpret/step.rs b/src/librustc_mir/interpret/step.rs
index 23ef03b051..0b5801c353 100644
--- a/src/librustc_mir/interpret/step.rs
+++ b/src/librustc_mir/interpret/step.rs
@@ -179,7 +179,7 @@ impl<'a, 'tcx, M: Machine<'tcx>> EvalContext<'a, 'tcx, M> {
179 assert!(!layout.is_unsized()); 179 assert!(!layout.is_unsized());
180 let ptr = self.memory.allocate( 180 let ptr = self.memory.allocate(
181 layout.size.bytes(), 181 layout.size.bytes(),
182 layout.align.abi(), 182 layout.align,
183 None, 183 None,
184 )?; 184 )?;
185 self.tcx.interpret_interner.borrow_mut().cache(cid, ptr.into()); 185 self.tcx.interpret_interner.borrow_mut().cache(cid, ptr.into());
@@ -264,7 +264,7 @@ impl<'a, 'b, 'tcx, M: Machine<'tcx>> Visitor<'tcx> for ConstantExtractor<'a, 'b,
264 assert!(!layout.is_unsized()); 264 assert!(!layout.is_unsized());
265 let ptr = this.ecx.memory.allocate( 265 let ptr = this.ecx.memory.allocate(
266 layout.size.bytes(), 266 layout.size.bytes(),
267 layout.align.abi(), 267 layout.align,
268 None, 268 None,
269 )?; 269 )?;
270 this.ecx.tcx.interpret_interner.borrow_mut().cache(cid, ptr.into()); 270 this.ecx.tcx.interpret_interner.borrow_mut().cache(cid, ptr.into());