From 0a67bf1b8a30f1fd540a577602c699d650366355 Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Thu, 9 May 2024 22:45:14 -0400 Subject: Make builtin_deref just return a Ty --- src/base.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/base.rs') diff --git a/src/base.rs b/src/base.rs index e3d050df4cd..8874efadec9 100644 --- a/src/base.rs +++ b/src/base.rs @@ -670,11 +670,8 @@ fn codegen_stmt<'tcx>( let to_ty = fx.monomorphize(to_ty); fn is_fat_ptr<'tcx>(fx: &FunctionCx<'_, '_, 'tcx>, ty: Ty<'tcx>) -> bool { - ty.builtin_deref(true).is_some_and( - |ty::TypeAndMut { ty: pointee_ty, mutbl: _ }| { - has_ptr_meta(fx.tcx, pointee_ty) - }, - ) + ty.builtin_deref(true) + .is_some_and(|pointee_ty| has_ptr_meta(fx.tcx, pointee_ty)) } if is_fat_ptr(fx, from_ty) { -- cgit 1.4.1-3-g733a5