Stop using a special inner body for the coroutine by-move body for async closures
This commit is contained in:
parent
515395af0e
commit
4609841c07
40 changed files with 295 additions and 315 deletions
|
@ -920,7 +920,6 @@ fn visit_instance_use<'tcx>(
|
|||
| ty::InstanceKind::ReifyShim(..)
|
||||
| ty::InstanceKind::ClosureOnceShim { .. }
|
||||
| ty::InstanceKind::ConstructCoroutineInClosureShim { .. }
|
||||
| ty::InstanceKind::CoroutineKindShim { .. }
|
||||
| ty::InstanceKind::Item(..)
|
||||
| ty::InstanceKind::FnPtrShim(..)
|
||||
| ty::InstanceKind::CloneShim(..)
|
||||
|
|
|
@ -626,7 +626,6 @@ fn characteristic_def_id_of_mono_item<'tcx>(
|
|||
| ty::InstanceKind::FnPtrShim(..)
|
||||
| ty::InstanceKind::ClosureOnceShim { .. }
|
||||
| ty::InstanceKind::ConstructCoroutineInClosureShim { .. }
|
||||
| ty::InstanceKind::CoroutineKindShim { .. }
|
||||
| ty::InstanceKind::Intrinsic(..)
|
||||
| ty::InstanceKind::DropGlue(..)
|
||||
| ty::InstanceKind::Virtual(..)
|
||||
|
@ -796,7 +795,6 @@ fn mono_item_visibility<'tcx>(
|
|||
| InstanceKind::Intrinsic(..)
|
||||
| InstanceKind::ClosureOnceShim { .. }
|
||||
| InstanceKind::ConstructCoroutineInClosureShim { .. }
|
||||
| InstanceKind::CoroutineKindShim { .. }
|
||||
| InstanceKind::DropGlue(..)
|
||||
| InstanceKind::AsyncDropGlueCtorShim(..)
|
||||
| InstanceKind::CloneShim(..)
|
||||
|
|
|
@ -127,7 +127,7 @@ fn mark_used_by_default_parameters<'tcx>(
|
|||
unused_parameters: &mut UnusedGenericParams,
|
||||
) {
|
||||
match tcx.def_kind(def_id) {
|
||||
DefKind::Closure => {
|
||||
DefKind::Closure | DefKind::SyntheticCoroutineBody => {
|
||||
for param in &generics.own_params {
|
||||
debug!(?param, "(closure/gen)");
|
||||
unused_parameters.mark_used(param.index);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue