Stop using a special inner body for the coroutine by-move body for async closures

This commit is contained in:
Michael Goulet
2024-08-01 13:05:17 -04:00
parent 515395af0e
commit 4609841c07
40 changed files with 295 additions and 315 deletions

View File

@@ -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);