diff --git a/src/eval_context.rs b/src/eval_context.rs index ff09e5db9490..f2790bd69365 100644 --- a/src/eval_context.rs +++ b/src/eval_context.rs @@ -670,9 +670,9 @@ impl<'a, 'tcx> EvalContext<'a, 'tcx> { Ref(_, _, ref lvalue) => { let src = self.eval_lvalue(lvalue)?; - // We ignore the alignment of the lvalue here -- this rvalue produces sth. of type &, which must always be aligned. + // We ignore the alignment of the lvalue here -- special handling for packed structs ends + // at the `&` operator. let (ptr, extra, _aligned) = self.force_allocation(src)?.to_ptr_extra_aligned(); - let ty = self.lvalue_ty(lvalue); let val = match extra { LvalueExtra::None => ptr.to_value(),