@@ -32,13 +32,9 @@ fn make_shim<'tcx>(tcx: TyCtxt<'tcx>, instance: ty::InstanceDef<'tcx>) -> Body<'
3232
3333 let mut result = match instance {
3434 ty:: InstanceDef :: Item ( ..) => bug ! ( "item {:?} passed to make_shim" , instance) ,
35- ty:: InstanceDef :: VtableShim ( def_id) => build_call_shim (
36- tcx,
37- instance,
38- Some ( Adjustment :: DerefMove ) ,
39- CallKind :: Direct ( def_id) ,
40- None ,
41- ) ,
35+ ty:: InstanceDef :: VtableShim ( def_id) => {
36+ build_call_shim ( tcx, instance, Some ( Adjustment :: Deref ) , CallKind :: Direct ( def_id) , None )
37+ }
4238 ty:: InstanceDef :: FnPtrShim ( def_id, ty) => {
4339 // FIXME(eddyb) support generating shims for a "shallow type",
4440 // e.g. `Foo<_>` or `[_]` instead of requiring a fully monomorphic
@@ -136,7 +132,6 @@ fn make_shim<'tcx>(tcx: TyCtxt<'tcx>, instance: ty::InstanceDef<'tcx>) -> Body<'
136132enum Adjustment {
137133 Identity ,
138134 Deref ,
139- DerefMove ,
140135 RefMut ,
141136}
142137
@@ -701,8 +696,7 @@ fn build_call_shim<'tcx>(
701696
702697 let rcvr = rcvr_adjustment. map ( |rcvr_adjustment| match rcvr_adjustment {
703698 Adjustment :: Identity => Operand :: Move ( rcvr_place ( ) ) ,
704- Adjustment :: Deref => Operand :: Move ( tcx. mk_place_deref ( rcvr_place ( ) ) ) , // Can't copy `&mut`
705- Adjustment :: DerefMove => Operand :: Move ( tcx. mk_place_deref ( rcvr_place ( ) ) ) ,
699+ Adjustment :: Deref => Operand :: Move ( tcx. mk_place_deref ( rcvr_place ( ) ) ) ,
706700 Adjustment :: RefMut => {
707701 // let rcvr = &mut rcvr;
708702 let ref_rcvr = local_decls. push (
0 commit comments