@@ -90,24 +90,20 @@ pub enum InstanceDef<'tcx> {
90
90
/// and dispatch to the `FnMut::call_mut` instance for the closure.
91
91
ClosureOnceShim { call_once : DefId , track_caller : bool } ,
92
92
93
- /// `<[FnMut/Fn coroutine-closure] as FnOnce>::call_once` or
94
- /// `<[Fn coroutine-closure] as FnMut>::call_mut`.
93
+ /// `<[FnMut/Fn coroutine-closure] as FnOnce>::call_once`
95
94
///
96
95
/// The body generated here differs significantly from the `ClosureOnceShim`,
97
96
/// since we need to generate a distinct coroutine type that will move the
98
97
/// closure's upvars *out* of the closure.
99
- ConstructCoroutineInClosureShim {
100
- coroutine_closure_def_id : DefId ,
101
- target_kind : ty:: ClosureKind ,
102
- } ,
98
+ ConstructCoroutineInClosureShim { coroutine_closure_def_id : DefId } ,
103
99
104
100
/// `<[coroutine] as Future>::poll`, but for coroutines produced when `AsyncFnOnce`
105
101
/// is called on a coroutine-closure whose closure kind greater than `FnOnce`, or
106
102
/// similarly for `AsyncFnMut`.
107
103
///
108
104
/// This will select the body that is produced by the `ByMoveBody` transform, and thus
109
105
/// take and use all of its upvars by-move rather than by-ref.
110
- CoroutineKindShim { coroutine_def_id : DefId , target_kind : ty :: ClosureKind } ,
106
+ CoroutineKindShim { coroutine_def_id : DefId } ,
111
107
112
108
/// Compiler-generated accessor for thread locals which returns a reference to the thread local
113
109
/// the `DefId` defines. This is used to export thread locals from dylibs on platforms lacking
@@ -192,9 +188,8 @@ impl<'tcx> InstanceDef<'tcx> {
192
188
| InstanceDef :: ClosureOnceShim { call_once : def_id, track_caller : _ }
193
189
| ty:: InstanceDef :: ConstructCoroutineInClosureShim {
194
190
coroutine_closure_def_id : def_id,
195
- target_kind : _,
196
191
}
197
- | ty:: InstanceDef :: CoroutineKindShim { coroutine_def_id : def_id, target_kind : _ }
192
+ | ty:: InstanceDef :: CoroutineKindShim { coroutine_def_id : def_id }
198
193
| InstanceDef :: DropGlue ( def_id, _)
199
194
| InstanceDef :: CloneShim ( def_id, _)
200
195
| InstanceDef :: FnPtrAddrShim ( def_id, _) => def_id,
@@ -651,10 +646,7 @@ impl<'tcx> Instance<'tcx> {
651
646
Some ( Instance { def : ty:: InstanceDef :: Item ( coroutine_def_id) , args } )
652
647
} else {
653
648
Some ( Instance {
654
- def : ty:: InstanceDef :: CoroutineKindShim {
655
- coroutine_def_id,
656
- target_kind : args. as_coroutine ( ) . kind_ty ( ) . to_opt_closure_kind ( ) . unwrap ( ) ,
657
- } ,
649
+ def : ty:: InstanceDef :: CoroutineKindShim { coroutine_def_id } ,
658
650
args,
659
651
} )
660
652
}
0 commit comments