@@ -2,9 +2,9 @@ use clippy_utils::diagnostics::span_lint_and_then;
22use clippy_utils:: { match_def_path, paths} ;
33use rustc_data_structures:: fx:: FxHashMap ;
44use rustc_hir:: def_id:: DefId ;
5- use rustc_hir:: { AsyncGeneratorKind , Body , GeneratorKind } ;
5+ use rustc_hir:: { AsyncCoroutineKind , Body , CoroutineKind } ;
66use rustc_lint:: { LateContext , LateLintPass } ;
7- use rustc_middle:: mir:: GeneratorLayout ;
7+ use rustc_middle:: mir:: CoroutineLayout ;
88use rustc_session:: { declare_tool_lint, impl_lint_pass} ;
99use rustc_span:: { sym, Span } ;
1010
@@ -195,8 +195,8 @@ impl LateLintPass<'_> for AwaitHolding {
195195 }
196196
197197 fn check_body ( & mut self , cx : & LateContext < ' _ > , body : & ' _ Body < ' _ > ) {
198- use AsyncGeneratorKind :: { Block , Closure , Fn } ;
199- if let Some ( GeneratorKind :: Async ( Block | Closure | Fn ) ) = body. generator_kind {
198+ use AsyncCoroutineKind :: { Block , Closure , Fn } ;
199+ if let Some ( CoroutineKind :: Async ( Block | Closure | Fn ) ) = body. generator_kind {
200200 let def_id = cx. tcx . hir ( ) . body_owner_def_id ( body. id ( ) ) ;
201201 if let Some ( generator_layout) = cx. tcx . mir_generator_witnesses ( def_id) {
202202 self . check_interior_types ( cx, generator_layout) ;
@@ -206,7 +206,7 @@ impl LateLintPass<'_> for AwaitHolding {
206206}
207207
208208impl AwaitHolding {
209- fn check_interior_types ( & self , cx : & LateContext < ' _ > , generator : & GeneratorLayout < ' _ > ) {
209+ fn check_interior_types ( & self , cx : & LateContext < ' _ > , generator : & CoroutineLayout < ' _ > ) {
210210 for ( ty_index, ty_cause) in generator. field_tys . iter_enumerated ( ) {
211211 if let rustc_middle:: ty:: Adt ( adt, _) = ty_cause. ty . kind ( ) {
212212 let await_points = || {
0 commit comments