1
Fork 0

Make Ty::boxed_ty return an Option

This commit is contained in:
Pavel Grigorenko 2024-09-05 00:34:04 +03:00
parent 842d6fc32e
commit f6e8a84eea
21 changed files with 58 additions and 48 deletions

View file

@ -189,7 +189,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
ty::Ref(_, ty, _) => *ty,
ty::RawPtr(ty, _) => *ty,
// We only accept `Box` with the default allocator.
_ if ty.is_box_global(*self.tcx) => ty.boxed_ty(),
_ if ty.is_box_global(*self.tcx) => ty.expect_boxed_ty(),
_ => return Ok(None),
}))
};