1
Fork 0

Make builtin_deref just return a Ty

This commit is contained in:
Michael Goulet 2024-05-09 22:45:14 -04:00
parent 8c7c151a7a
commit d50c2b0a52
43 changed files with 92 additions and 116 deletions

View file

@ -127,7 +127,7 @@ pub(crate) fn coerce_unsized_into<'tcx>(
let dst_ty = dst.layout().ty;
let mut coerce_ptr = || {
let (base, info) =
if fx.layout_of(src.layout().ty.builtin_deref(true).unwrap().ty).is_unsized() {
if fx.layout_of(src.layout().ty.builtin_deref(true).unwrap()).is_unsized() {
let (old_base, old_info) = src.load_scalar_pair(fx);
unsize_ptr(fx, old_base, src.layout(), dst.layout(), Some(old_info))
} else {