From: Ralf Jung Date: Thu, 3 Aug 2017 18:06:25 +0000 (-0700) Subject: fix comment X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=5d27b94b04b87f6ca65c770e8e788c17f7af7a13;p=rust.git fix comment --- diff --git a/src/librustc_mir/interpret/eval_context.rs b/src/librustc_mir/interpret/eval_context.rs index 30a305a7b60..16015c4bf3a 100644 --- a/src/librustc_mir/interpret/eval_context.rs +++ b/src/librustc_mir/interpret/eval_context.rs @@ -277,10 +277,13 @@ pub fn erase_lifetimes(&self, value: &Binder) -> T self.tcx.erase_regions(&value) } + /// Return the size and aligment of the value at the given type. + /// Note that the value does not matter if the type is sized. For unsized types, + /// the value has to be a fat pointer, and we only care about the "extra" data in it. pub fn size_and_align_of_dst( &mut self, ty: ty::Ty<'tcx>, - value: Value, // This has to be a fat ptr; we only care about the "extra" data in it. + value: Value, ) -> EvalResult<'tcx, (u64, u64)> { if let Some(size) = self.type_size(ty)? { Ok((size as u64, self.type_align(ty)? as u64))