Skip to content

Commit de53cba

Browse files
committed
use type_is_szed_modulo_regions
1 parent b8cfac1 commit de53cba

File tree

1 file changed

+1
-1
lines changed
  • compiler/rustc_hir_typeck/src

1 file changed

+1
-1
lines changed

compiler/rustc_hir_typeck/src/cast.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ impl<'a, 'tcx> CastCheck<'tcx> {
725725
},
726726
// array-ptr-cast
727727
Ptr(mt) => {
728-
if !mt.ty.is_sized(fcx.tcx, fcx.param_env) {
728+
if !fcx.type_is_sized_modulo_regions(fcx.param_env, mt.ty) {
729729
return Err(CastError::IllegalCast);
730730
}
731731
self.check_ref_cast(fcx, TypeAndMut { mutbl, ty: inner_ty }, mt)

0 commit comments

Comments
 (0)