@@ -2,9 +2,9 @@ use clippy_utils::diagnostics::span_lint_and_then;
2
2
use clippy_utils:: { match_def_path, paths} ;
3
3
use rustc_data_structures:: fx:: FxHashMap ;
4
4
use rustc_hir:: def_id:: DefId ;
5
- use rustc_hir:: { AsyncGeneratorKind , Body , GeneratorKind } ;
5
+ use rustc_hir:: { AsyncCoroutineKind , Body , CoroutineKind } ;
6
6
use rustc_lint:: { LateContext , LateLintPass } ;
7
- use rustc_middle:: mir:: GeneratorLayout ;
7
+ use rustc_middle:: mir:: CoroutineLayout ;
8
8
use rustc_session:: { declare_tool_lint, impl_lint_pass} ;
9
9
use rustc_span:: { sym, Span } ;
10
10
@@ -195,8 +195,8 @@ impl LateLintPass<'_> for AwaitHolding {
195
195
}
196
196
197
197
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 {
200
200
let def_id = cx. tcx . hir ( ) . body_owner_def_id ( body. id ( ) ) ;
201
201
if let Some ( generator_layout) = cx. tcx . mir_generator_witnesses ( def_id) {
202
202
self . check_interior_types ( cx, generator_layout) ;
@@ -206,7 +206,7 @@ impl LateLintPass<'_> for AwaitHolding {
206
206
}
207
207
208
208
impl AwaitHolding {
209
- fn check_interior_types ( & self , cx : & LateContext < ' _ > , generator : & GeneratorLayout < ' _ > ) {
209
+ fn check_interior_types ( & self , cx : & LateContext < ' _ > , generator : & CoroutineLayout < ' _ > ) {
210
210
for ( ty_index, ty_cause) in generator. field_tys . iter_enumerated ( ) {
211
211
if let rustc_middle:: ty:: Adt ( adt, _) = ty_cause. ty . kind ( ) {
212
212
let await_points = || {
0 commit comments