File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ use if_chain::if_chain;
6
6
use rustc_errors:: Applicability ;
7
7
use rustc_hir as hir;
8
8
use rustc_hir:: intravisit:: { Visitor as HirVisitor , Visitor } ;
9
- use rustc_hir:: { intravisit as hir_visit, AsyncCoroutineKind , CoroutineKind } ;
9
+ use rustc_hir:: { intravisit as hir_visit} ;
10
10
use rustc_lint:: { LateContext , LateLintPass } ;
11
11
use rustc_middle:: hir:: nested_filter;
12
12
use rustc_middle:: lint:: in_external_macro;
@@ -62,7 +62,7 @@ impl<'tcx> Visitor<'tcx> for ReturnVisitor {
62
62
}
63
63
64
64
/// Checks if the body is owned by an async closure
65
- fn is_async_closure ( cx : & LateContext < ' _ > , body : & hir:: Body < ' _ > ) -> bool {
65
+ fn is_async_closure ( body : & hir:: Body < ' _ > ) -> bool {
66
66
// NB: `async || 42` is desugared into `|| |mut __context: #[lang = "ResumeTy"] | 42`; so
67
67
// we need to check if there is inner closure and check GeneratorKind of the inner one.
68
68
if let hir:: ExprKind :: Closure ( closure) = body. value . kind
You can’t perform that action at this time.
0 commit comments