diff --git a/src/eval_context.rs b/src/eval_context.rs index fbad94b67ae..ac6fffd1e0d 100644 --- a/src/eval_context.rs +++ b/src/eval_context.rs @@ -746,7 +746,7 @@ pub fn get_field_ty(&self, ty: Ty<'tcx>, field_index: usize) -> EvalResult<'tcx, Ok(adt_def.struct_variant().fields[field_index].ty(self.tcx, substs)) } - ty::TyTuple(fields) => Ok(fields[field_index]), + ty::TyTuple(fields, _) => Ok(fields[field_index]), ty::TyRef(_, ref tam) | ty::TyRawPtr(ref tam) => self.get_fat_field(tam.ty, field_index), diff --git a/src/step.rs b/src/step.rs index 0200e458014..fd90b33c82b 100644 --- a/src/step.rs +++ b/src/step.rs @@ -157,6 +157,8 @@ fn global_item(&mut self, def_id: DefId, substs: &'tcx subst::Substs<'tcx>, span let mir = this.ecx.load_mir(def_id)?; this.ecx.globals.insert(cid, Global::uninitialized(mir.return_ty)); let cleanup = StackPopCleanup::MarkStatic(!immutable || mir.return_ty.type_contents(this.ecx.tcx).interior_unsafe()); + let name = ty::tls::with(|tcx| tcx.item_path_str(def_id)); + trace!("pushing stack frame for global: {}", name); this.ecx.push_stack_frame(def_id, span, mir, substs, Lvalue::Global(cid), cleanup, Vec::new()) }); } @@ -201,6 +203,7 @@ fn visit_constant(&mut self, constant: &mir::Constant<'tcx>, location: mir::Loca self.try(|this| { let ty = this.ecx.monomorphize(mir.return_ty, this.substs); this.ecx.globals.insert(cid, Global::uninitialized(ty)); + trace!("pushing stack frame for {:?}", index); this.ecx.push_stack_frame(this.def_id, constant.span, mir, diff --git a/src/terminator/mod.rs b/src/terminator/mod.rs index 79668639dc9..e8fe9865783 100644 --- a/src/terminator/mod.rs +++ b/src/terminator/mod.rs @@ -520,7 +520,7 @@ fn unpack_fn_args(&self, args: &mut Vec<(Value, Ty<'tcx>)>) -> EvalResult<'tcx> if let Some((last, last_ty)) = args.pop() { let last_layout = self.type_layout(last_ty)?; match (&last_ty.sty, last_layout) { - (&ty::TyTuple(fields), + (&ty::TyTuple(fields, _), &Layout::Univariant { ref variant, .. }) => { let offsets = variant.offsets.iter().map(|s| s.bytes()); let last_ptr = match last { @@ -786,7 +786,7 @@ pub fn drop( drop, )?; }, - ty::TyTuple(fields) => { + ty::TyTuple(fields, _) => { let offsets = match *self.type_layout(ty)? { Layout::Univariant { ref variant, .. } => &variant.offsets, _ => bug!("tuples must be univariant"),