We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b8cfac1 commit de53cbaCopy full SHA for de53cba
compiler/rustc_hir_typeck/src/cast.rs
@@ -725,7 +725,7 @@ impl<'a, 'tcx> CastCheck<'tcx> {
725
},
726
// array-ptr-cast
727
Ptr(mt) => {
728
- if !mt.ty.is_sized(fcx.tcx, fcx.param_env) {
+ if !fcx.type_is_sized_modulo_regions(fcx.param_env, mt.ty) {
729
return Err(CastError::IllegalCast);
730
}
731
self.check_ref_cast(fcx, TypeAndMut { mutbl, ty: inner_ty }, mt)
0 commit comments