@@ -32,13 +32,9 @@ fn make_shim<'tcx>(tcx: TyCtxt<'tcx>, instance: ty::InstanceDef<'tcx>) -> Body<'
32
32
33
33
let mut result = match instance {
34
34
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
+ }
42
38
ty:: InstanceDef :: FnPtrShim ( def_id, ty) => {
43
39
// FIXME(eddyb) support generating shims for a "shallow type",
44
40
// 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<'
136
132
enum Adjustment {
137
133
Identity ,
138
134
Deref ,
139
- DerefMove ,
140
135
RefMut ,
141
136
}
142
137
@@ -701,8 +696,7 @@ fn build_call_shim<'tcx>(
701
696
702
697
let rcvr = rcvr_adjustment. map ( |rcvr_adjustment| match rcvr_adjustment {
703
698
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 ( ) ) ) ,
706
700
Adjustment :: RefMut => {
707
701
// let rcvr = &mut rcvr;
708
702
let ref_rcvr = local_decls. push (
0 commit comments