@@ -23,7 +23,8 @@ use super::{DOUBLE_MUST_USE, MUST_USE_CANDIDATE, MUST_USE_UNIT};
2323pub ( super ) fn check_item < ' tcx > ( cx : & LateContext < ' tcx > , item : & ' tcx hir:: Item < ' _ > ) {
2424 let attrs = cx. tcx . hir ( ) . attrs ( item. hir_id ( ) ) ;
2525 let attr = cx. tcx . get_attr ( item. owner_id , sym:: must_use) ;
26- if let hir:: ItemKind :: Fn ( ref sig, _generics, ref body_id) = item. kind {
26+ if let hir:: ItemKind :: Fn ( ref sig, _generics, ref body_id) = item. kind && !sig. header . is_async ( ) /* (#10486) */ {
27+
2728 let is_public = cx. effective_visibilities . is_exported ( item. owner_id . def_id ) ;
2829 let fn_header_span = item. span . with_hi ( sig. decl . output . span ( ) . hi ( ) ) ;
2930 if let Some ( attr) = attr {
@@ -43,7 +44,7 @@ pub(super) fn check_item<'tcx>(cx: &LateContext<'tcx>, item: &'tcx hir::Item<'_>
4344}
4445
4546pub ( super ) fn check_impl_item < ' tcx > ( cx : & LateContext < ' tcx > , item : & ' tcx hir:: ImplItem < ' _ > ) {
46- if let hir:: ImplItemKind :: Fn ( ref sig, ref body_id) = item. kind {
47+ if let hir:: ImplItemKind :: Fn ( ref sig, ref body_id) = item. kind && !sig . header . is_async ( ) /* (#10486) */ {
4748 let is_public = cx. effective_visibilities . is_exported ( item. owner_id . def_id ) ;
4849 let fn_header_span = item. span . with_hi ( sig. decl . output . span ( ) . hi ( ) ) ;
4950 let attrs = cx. tcx . hir ( ) . attrs ( item. hir_id ( ) ) ;
@@ -65,7 +66,7 @@ pub(super) fn check_impl_item<'tcx>(cx: &LateContext<'tcx>, item: &'tcx hir::Imp
6566}
6667
6768pub ( super ) fn check_trait_item < ' tcx > ( cx : & LateContext < ' tcx > , item : & ' tcx hir:: TraitItem < ' _ > ) {
68- if let hir:: TraitItemKind :: Fn ( ref sig, ref eid) = item. kind {
69+ if let hir:: TraitItemKind :: Fn ( ref sig, ref eid) = item. kind && !sig . header . is_async ( ) /* (#10486) */ {
6970 let is_public = cx. effective_visibilities . is_exported ( item. owner_id . def_id ) ;
7071 let fn_header_span = item. span . with_hi ( sig. decl . output . span ( ) . hi ( ) ) ;
7172
0 commit comments