@@ -87,10 +87,10 @@ use rustc_hir::hir_id::{HirIdMap, HirIdSet};
87
87
use rustc_hir:: intravisit:: { walk_expr, FnKind , Visitor } ;
88
88
use rustc_hir:: LangItem :: { OptionNone , ResultErr , ResultOk } ;
89
89
use rustc_hir:: {
90
- def, Arm , ArrayLen , BindingAnnotation , Block , BlockCheckMode , Body , Closure , Constness , Destination , Expr ,
91
- ExprKind , FnDecl , HirId , Impl , ImplItem , ImplItemKind , IsAsync , Item , ItemKind , LangItem , Local , MatchSource ,
92
- Mutability , Node , Param , Pat , PatKind , Path , PathSegment , PrimTy , QPath , Stmt , StmtKind , TraitItem , TraitItemKind ,
93
- TraitRef , TyKind , UnOp ,
90
+ def, Arm , ArrayLen , BindingAnnotation , Block , BlockCheckMode , Body , Closure , Constness ,
91
+ Destination , Expr , ExprKind , FnDecl , HirId , Impl , ImplItem , ImplItemKind , Item , ItemKind ,
92
+ LangItem , Local , MatchSource , Mutability , Node , Param , Pat , PatKind , Path , PathSegment , PrimTy ,
93
+ QPath , Stmt , StmtKind , TraitItem , TraitItemKind , TraitRef , TyKind , UnOp ,
94
94
} ;
95
95
use rustc_lexer:: { tokenize, TokenKind } ;
96
96
use rustc_lint:: { LateContext , Level , Lint , LintContext } ;
@@ -1861,7 +1861,7 @@ pub fn if_sequence<'tcx>(mut expr: &'tcx Expr<'tcx>) -> (Vec<&'tcx Expr<'tcx>>,
1861
1861
1862
1862
/// Checks if the given function kind is an async function.
1863
1863
pub fn is_async_fn ( kind : FnKind < ' _ > ) -> bool {
1864
- matches ! ( kind, FnKind :: ItemFn ( _, _, header) if header. asyncness == IsAsync :: Async )
1864
+ matches ! ( kind, FnKind :: ItemFn ( _, _, header) if header. asyncness. is_async ( ) )
1865
1865
}
1866
1866
1867
1867
/// Peels away all the compiler generated code surrounding the body of an async function,
0 commit comments