Skip to content

Commit 5d27b94

Browse files
committed
fix comment
1 parent c533cf8 commit 5d27b94

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/librustc_mir/interpret/eval_context.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,10 +277,13 @@ impl<'a, 'tcx, M: Machine<'tcx>> EvalContext<'a, 'tcx, M> {
277277
self.tcx.erase_regions(&value)
278278
}
279279

280+
/// Return the size and aligment of the value at the given type.
281+
/// Note that the value does not matter if the type is sized. For unsized types,
282+
/// the value has to be a fat pointer, and we only care about the "extra" data in it.
280283
pub fn size_and_align_of_dst(
281284
&mut self,
282285
ty: ty::Ty<'tcx>,
283-
value: Value, // This has to be a fat ptr; we only care about the "extra" data in it.
286+
value: Value,
284287
) -> EvalResult<'tcx, (u64, u64)> {
285288
if let Some(size) = self.type_size(ty)? {
286289
Ok((size as u64, self.type_align(ty)? as u64))

0 commit comments

Comments
 (0)