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