From 4a39c228df089e32cebea1b1aec8cd9694089574 Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Tue, 15 Nov 2016 14:11:44 +0100 Subject: [PATCH] minor fixes the FIXME was wrong here, there's no need for any special offsetting --- src/interpreter/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/interpreter/mod.rs b/src/interpreter/mod.rs index 3a4d875921a7..a67142e7335d 100644 --- a/src/interpreter/mod.rs +++ b/src/interpreter/mod.rs @@ -1406,7 +1406,7 @@ impl<'a, 'tcx> EvalContext<'a, 'tcx> { if self.type_is_sized(ty) { PrimVal::from_ptr(p) } else { - // FIXME: extract the offset to the tail field for `Box<(i64, i32, [u8])>` + trace!("reading fat pointer extra of type {}", ty); let extra = ptr.offset(self.memory.pointer_size() as isize); let extra = match self.tcx.struct_tail(ty).sty { ty::TyTrait(..) => PrimVal::from_ptr(self.memory.read_ptr(extra)?), @@ -1513,7 +1513,7 @@ impl<'a, 'tcx> EvalContext<'a, 'tcx> { //let dst = adt::MaybeSizedValue::sized(dst); let src_ptr = match src { Value::ByRef(ptr) => ptr, - _ => panic!("expected pointer, got {:?}", src), + _ => bug!("expected pointer, got {:?}", src), }; let iter = src_fields.zip(dst_fields).enumerate();