@@ -90,7 +90,7 @@ use rustc_hir::intravisit::{walk_expr, FnKind, Visitor};
9090use rustc_hir:: LangItem :: { OptionNone , OptionSome , ResultErr , ResultOk } ;
9191use rustc_hir:: {
9292 self as hir, def, Arm , ArrayLen , BindingAnnotation , Block , BlockCheckMode , Body , Closure , Destination , Expr ,
93- ExprField , ExprKind , FnDecl , FnRetTy , GenericArgs , HirId , Impl , ImplItem , ImplItemKind , ImplItemRef , IsAsync , Item ,
93+ ExprField , ExprKind , FnDecl , FnRetTy , GenericArgs , HirId , Impl , ImplItem , ImplItemKind , ImplItemRef , Item ,
9494 ItemKind , LangItem , Local , MatchSource , Mutability , Node , OwnerId , Param , Pat , PatKind , Path , PathSegment , PrimTy ,
9595 QPath , Stmt , StmtKind , TraitItem , TraitItemKind , TraitItemRef , TraitRef , TyKind , UnOp ,
9696} ;
@@ -1958,8 +1958,8 @@ pub fn if_sequence<'tcx>(mut expr: &'tcx Expr<'tcx>) -> (Vec<&'tcx Expr<'tcx>>,
19581958/// Checks if the given function kind is an async function.
19591959pub fn is_async_fn ( kind : FnKind < ' _ > ) -> bool {
19601960 match kind {
1961- FnKind :: ItemFn ( _, _, header) => header. asyncness == IsAsync :: Async ,
1962- FnKind :: Method ( _, sig) => sig. header . asyncness == IsAsync :: Async ,
1961+ FnKind :: ItemFn ( _, _, header) => header. asyncness . is_async ( ) ,
1962+ FnKind :: Method ( _, sig) => sig. header . asyncness . is_async ( ) ,
19631963 FnKind :: Closure => false ,
19641964 }
19651965}
0 commit comments