@@ -50,7 +50,8 @@ use rustc_infer::traits::{
5050} ;
5151use rustc_middle:: span_bug;
5252use rustc_middle:: ty:: adjustment:: {
53- Adjust , Adjustment , AllowTwoPhase , AutoBorrow , AutoBorrowMutability , PointerCoercion ,
53+ Adjust , Adjustment , AllowTwoPhase , AutoBorrow , AutoBorrowMutability , DerefAdjustKind ,
54+ PointerCoercion ,
5455} ;
5556use rustc_middle:: ty:: error:: TypeError ;
5657use rustc_middle:: ty:: { self , Ty , TyCtxt , TypeVisitableExt } ;
@@ -595,7 +596,7 @@ impl<'f, 'tcx> Coerce<'f, 'tcx> {
595596 let mutbl = AutoBorrowMutability :: new ( mutbl_b, AllowTwoPhase :: No ) ;
596597
597598 Some ( (
598- Adjustment { kind : Adjust :: Deref ( None ) , target : ty_a } ,
599+ Adjustment { kind : Adjust :: Deref ( DerefAdjustKind :: Builtin ) , target : ty_a } ,
599600 Adjustment {
600601 kind : Adjust :: Borrow ( AutoBorrow :: Ref ( mutbl) ) ,
601602 target : Ty :: new_ref ( self . tcx , r_borrow, ty_a, mutbl_b) ,
@@ -606,7 +607,7 @@ impl<'f, 'tcx> Coerce<'f, 'tcx> {
606607 coerce_mutbls ( mt_a, mt_b) ?;
607608
608609 Some ( (
609- Adjustment { kind : Adjust :: Deref ( None ) , target : ty_a } ,
610+ Adjustment { kind : Adjust :: Deref ( DerefAdjustKind :: Builtin ) , target : ty_a } ,
610611 Adjustment {
611612 kind : Adjust :: Borrow ( AutoBorrow :: RawPtr ( mt_b) ) ,
612613 target : Ty :: new_ptr ( self . tcx , ty_a, mt_b) ,
@@ -936,7 +937,7 @@ impl<'f, 'tcx> Coerce<'f, 'tcx> {
936937 self . unify_and (
937938 a_raw,
938939 b,
939- [ Adjustment { kind : Adjust :: Deref ( None ) , target : mt_a. ty } ] ,
940+ [ Adjustment { kind : Adjust :: Deref ( DerefAdjustKind :: Builtin ) , target : mt_a. ty } ] ,
940941 Adjust :: Borrow ( AutoBorrow :: RawPtr ( mutbl_b) ) ,
941942 ForceLeakCheck :: No ,
942943 )
0 commit comments