@@ -162,11 +162,8 @@ impl<'a, T: EarlyLintPass> ast_visit::Visitor<'a> for EarlyContextAndPass<'a, T>
162162        // Explicitly check for lints associated with 'closure_id', since 
163163        // it does not have a corresponding AST node 
164164        if  let  ast_visit:: FnKind :: Fn ( _,  _,  sig,  _,  _,  _)  = fk { 
165-             if  let  Some ( coro_kind)  = sig. header . coroutine_kind  { 
166-                 let  ( ast:: CoroutineKind :: Async  {  closure_id,  .. } 
167-                 | ast:: CoroutineKind :: Gen  {  closure_id,  .. } 
168-                 | ast:: CoroutineKind :: AsyncGen  {  closure_id,  .. } )  = coro_kind; 
169-                 self . check_id ( closure_id) ; 
165+             if  let  Some ( coroutine_kind)  = sig. header . coroutine_kind  { 
166+                 self . check_id ( coroutine_kind. closure_id ( ) ) ; 
170167            } 
171168        } 
172169    } 
@@ -226,12 +223,10 @@ impl<'a, T: EarlyLintPass> ast_visit::Visitor<'a> for EarlyContextAndPass<'a, T>
226223        // it does not have a corresponding AST node 
227224        match  e. kind  { 
228225            ast:: ExprKind :: Closure ( box ast:: Closure  { 
229-                 coroutine_kind :  Some ( coro_kind) ,  ..
226+                 coroutine_kind :  Some ( coroutine_kind) , 
227+                 ..
230228            } )  => { 
231-                 let  ( ast:: CoroutineKind :: Async  {  closure_id,  .. } 
232-                 | ast:: CoroutineKind :: Gen  {  closure_id,  .. } 
233-                 | ast:: CoroutineKind :: AsyncGen  {  closure_id,  .. } )  = coro_kind; 
234-                 self . check_id ( closure_id) ; 
229+                 self . check_id ( coroutine_kind. closure_id ( ) ) ; 
235230            } 
236231            _ => { } 
237232        } 
0 commit comments