@@ -90,7 +90,7 @@ use rustc_hir::intravisit::{walk_expr, FnKind, Visitor};
90
90
use rustc_hir:: LangItem :: { OptionNone , OptionSome , ResultErr , ResultOk } ;
91
91
use rustc_hir:: {
92
92
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 ,
94
94
ItemKind , LangItem , Local , MatchSource , Mutability , Node , OwnerId , Param , Pat , PatKind , Path , PathSegment , PrimTy ,
95
95
QPath , Stmt , StmtKind , TraitItem , TraitItemKind , TraitItemRef , TraitRef , TyKind , UnOp ,
96
96
} ;
@@ -1958,8 +1958,8 @@ pub fn if_sequence<'tcx>(mut expr: &'tcx Expr<'tcx>) -> (Vec<&'tcx Expr<'tcx>>,
1958
1958
/// Checks if the given function kind is an async function.
1959
1959
pub fn is_async_fn ( kind : FnKind < ' _ > ) -> bool {
1960
1960
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 ( ) ,
1963
1963
FnKind :: Closure => false ,
1964
1964
}
1965
1965
}
0 commit comments