@@ -404,17 +404,12 @@ pub(crate) fn coerce_unsized_info<'tcx>(
404404 check_mutbl ( mt_a, mt_b, & |ty| Ty :: new_imm_ref ( tcx, r_b, ty) )
405405 }
406406
407- ( & ty:: Ref ( _, ty_a, mutbl_a) , & ty:: RawPtr ( ty_b, mutbl_b) ) => check_mutbl (
408- ty:: TypeAndMut { ty : ty_a, mutbl : mutbl_a } ,
409- ty:: TypeAndMut { ty : ty_b, mutbl : mutbl_b } ,
410- & |ty| Ty :: new_imm_ptr ( tcx, ty) ,
411- ) ,
412-
413- ( & ty:: RawPtr ( ty_a, mutbl_a) , & ty:: RawPtr ( ty_b, mutbl_b) ) => check_mutbl (
414- ty:: TypeAndMut { ty : ty_a, mutbl : mutbl_a } ,
415- ty:: TypeAndMut { ty : ty_b, mutbl : mutbl_b } ,
416- & |ty| Ty :: new_imm_ptr ( tcx, ty) ,
417- ) ,
407+ ( & ty:: Ref ( _, ty_a, mutbl_a) , & ty:: RawPtr ( ty_b, mutbl_b) )
408+ | ( & ty:: RawPtr ( ty_a, mutbl_a) , & ty:: RawPtr ( ty_b, mutbl_b) ) => {
409+ let mt_a = ty:: TypeAndMut { ty : ty_a, mutbl : mutbl_a } ;
410+ let mt_b = ty:: TypeAndMut { ty : ty_b, mutbl : mutbl_b } ;
411+ check_mutbl ( mt_a, mt_b, & |ty| Ty :: new_imm_ptr ( tcx, ty) )
412+ }
418413
419414 ( & ty:: Adt ( def_a, args_a) , & ty:: Adt ( def_b, args_b) )
420415 if def_a. is_struct ( ) && def_b. is_struct ( ) =>
0 commit comments