@@ -206,19 +206,25 @@ impl<'hir> LoweringContext<'_, 'hir> {
206206 // `impl Future<Output = T>` here because lower_body
207207 // only cares about the input argument patterns in the function
208208 // declaration (decl), not the return types.
209- let coro_kind = header. coro_kind ;
209+ let coroutine_kind = header. coroutine_kind ;
210210 let body_id = this. lower_maybe_coroutine_body (
211211 span,
212212 hir_id,
213213 decl,
214- coro_kind ,
214+ coroutine_kind ,
215215 body. as_deref ( ) ,
216216 ) ;
217217
218218 let itctx = ImplTraitContext :: Universal ;
219219 let ( generics, decl) =
220220 this. lower_generics ( generics, header. constness , id, & itctx, |this| {
221- this. lower_fn_decl ( decl, id, * fn_sig_span, FnDeclKind :: Fn , coro_kind)
221+ this. lower_fn_decl (
222+ decl,
223+ id,
224+ * fn_sig_span,
225+ FnDeclKind :: Fn ,
226+ coroutine_kind,
227+ )
222228 } ) ;
223229 let sig = hir:: FnSig {
224230 decl,
@@ -735,7 +741,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
735741 sig,
736742 i. id ,
737743 FnDeclKind :: Trait ,
738- sig. header . coro_kind ,
744+ sig. header . coroutine_kind ,
739745 ) ;
740746 ( generics, hir:: TraitItemKind :: Fn ( sig, hir:: TraitFn :: Required ( names) ) , false )
741747 }
@@ -744,15 +750,15 @@ impl<'hir> LoweringContext<'_, 'hir> {
744750 i. span ,
745751 hir_id,
746752 & sig. decl ,
747- sig. header . coro_kind ,
753+ sig. header . coroutine_kind ,
748754 Some ( body) ,
749755 ) ;
750756 let ( generics, sig) = self . lower_method_sig (
751757 generics,
752758 sig,
753759 i. id ,
754760 FnDeclKind :: Trait ,
755- sig. header . coro_kind ,
761+ sig. header . coroutine_kind ,
756762 ) ;
757763 ( generics, hir:: TraitItemKind :: Fn ( sig, hir:: TraitFn :: Provided ( body_id) ) , true )
758764 }
@@ -845,15 +851,15 @@ impl<'hir> LoweringContext<'_, 'hir> {
845851 i. span ,
846852 hir_id,
847853 & sig. decl ,
848- sig. header . coro_kind ,
854+ sig. header . coroutine_kind ,
849855 body. as_deref ( ) ,
850856 ) ;
851857 let ( generics, sig) = self . lower_method_sig (
852858 generics,
853859 sig,
854860 i. id ,
855861 if self . is_in_trait_impl { FnDeclKind :: Impl } else { FnDeclKind :: Inherent } ,
856- sig. header . coro_kind ,
862+ sig. header . coroutine_kind ,
857863 ) ;
858864
859865 ( generics, hir:: ImplItemKind :: Fn ( sig, body_id) )
@@ -1024,13 +1030,13 @@ impl<'hir> LoweringContext<'_, 'hir> {
10241030 span : Span ,
10251031 fn_id : hir:: HirId ,
10261032 decl : & FnDecl ,
1027- coro_kind : Option < CoroutineKind > ,
1033+ coroutine_kind : Option < CoroutineKind > ,
10281034 body : Option < & Block > ,
10291035 ) -> hir:: BodyId {
1030- let ( Some ( coro_kind ) , Some ( body) ) = ( coro_kind , body) else {
1036+ let ( Some ( coroutine_kind ) , Some ( body) ) = ( coroutine_kind , body) else {
10311037 return self . lower_fn_body_block ( span, decl, body) ;
10321038 } ;
1033- let closure_id = match coro_kind {
1039+ let closure_id = match coroutine_kind {
10341040 CoroutineKind :: Async { closure_id, .. } | CoroutineKind :: Gen { closure_id, .. } => {
10351041 closure_id
10361042 }
@@ -1201,7 +1207,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
12011207
12021208 this. expr_block ( body)
12031209 } ;
1204- let coroutine_expr = match coro_kind {
1210+ let coroutine_expr = match coroutine_kind {
12051211 CoroutineKind :: Async { .. } => this. make_async_expr (
12061212 CaptureBy :: Value { move_kw : rustc_span:: DUMMY_SP } ,
12071213 closure_id,
@@ -1234,19 +1240,19 @@ impl<'hir> LoweringContext<'_, 'hir> {
12341240 sig : & FnSig ,
12351241 id : NodeId ,
12361242 kind : FnDeclKind ,
1237- coro_kind : Option < CoroutineKind > ,
1243+ coroutine_kind : Option < CoroutineKind > ,
12381244 ) -> ( & ' hir hir:: Generics < ' hir > , hir:: FnSig < ' hir > ) {
12391245 let header = self . lower_fn_header ( sig. header ) ;
12401246 let itctx = ImplTraitContext :: Universal ;
12411247 let ( generics, decl) =
12421248 self . lower_generics ( generics, sig. header . constness , id, & itctx, |this| {
1243- this. lower_fn_decl ( & sig. decl , id, sig. span , kind, coro_kind )
1249+ this. lower_fn_decl ( & sig. decl , id, sig. span , kind, coroutine_kind )
12441250 } ) ;
12451251 ( generics, hir:: FnSig { header, decl, span : self . lower_span ( sig. span ) } )
12461252 }
12471253
12481254 fn lower_fn_header ( & mut self , h : FnHeader ) -> hir:: FnHeader {
1249- let asyncness = if let Some ( CoroutineKind :: Async { span, .. } ) = h. coro_kind {
1255+ let asyncness = if let Some ( CoroutineKind :: Async { span, .. } ) = h. coroutine_kind {
12501256 hir:: IsAsync :: Async ( span)
12511257 } else {
12521258 hir:: IsAsync :: NotAsync
0 commit comments