From f9818bf8187b9a9d9ce9828a3fa1213fc08bdd94 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Wed, 19 Jul 2017 13:31:21 -0700 Subject: [PATCH] fix a warning --- src/eval_context.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(),