]> git.lizzy.rs Git - rust.git/commitdiff
fix comment
authorRalf Jung <post@ralfj.de>
Thu, 3 Aug 2017 18:06:25 +0000 (11:06 -0700)
committerRalf Jung <post@ralfj.de>
Thu, 3 Aug 2017 18:06:25 +0000 (11:06 -0700)
src/librustc_mir/interpret/eval_context.rs

index 30a305a7b60bf82b02106f44f363a966af215cac..16015c4bf3a2c438d73589f92a6292a3e6402272 100644 (file)
@@ -277,10 +277,13 @@ pub fn erase_lifetimes<T>(&self, value: &Binder<T>) -> 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))