coro_kind -> coroutine_kind

This commit is contained in:
Michael Goulet
2023-12-05 21:39:36 +00:00
parent 96bb542a31
commit 2806c2df7b
23 changed files with 100 additions and 75 deletions

View File

@@ -916,8 +916,10 @@ impl<'a: 'ast, 'ast, 'tcx> Visitor<'ast> for LateResolutionVisitor<'a, '_, 'ast,
&sig.decl.output,
);
if let Some((coro_node_id, _)) =
sig.header.coro_kind.map(|coro_kind| coro_kind.return_id())
if let Some((coro_node_id, _)) = sig
.header
.coroutine_kind
.map(|coroutine_kind| coroutine_kind.return_id())
{
this.record_lifetime_params_for_impl_trait(coro_node_id);
}
@@ -942,8 +944,10 @@ impl<'a: 'ast, 'ast, 'tcx> Visitor<'ast> for LateResolutionVisitor<'a, '_, 'ast,
this.visit_generics(generics);
let declaration = &sig.decl;
let coro_node_id =
sig.header.coro_kind.map(|coro_kind| coro_kind.return_id());
let coro_node_id = sig
.header
.coroutine_kind
.map(|coroutine_kind| coroutine_kind.return_id());
this.with_lifetime_rib(
LifetimeRibKind::AnonymousCreateParameter {
@@ -4294,7 +4298,7 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> {
//
// Similarly, `gen |x| ...` gets desugared to `|x| gen {...}`, so we handle that too.
ExprKind::Closure(box ast::Closure {
coro_kind: Some(_),
coroutine_kind: Some(_),
ref fn_decl,
ref body,
..