add is_sized method on Abi and Layout, and use it
This commit is contained in:
@@ -53,7 +53,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
|
||||
) -> InterpResult<'tcx, (Size, Align)> {
|
||||
let (ty, _trait_ref) = self.get_ptr_vtable(vtable)?;
|
||||
let layout = self.layout_of(ty)?;
|
||||
assert!(!layout.is_unsized(), "there are no vtables for unsized types");
|
||||
assert!(layout.is_sized(), "there are no vtables for unsized types");
|
||||
Ok((layout.size, layout.align.abi))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user