@@ -1199,11 +1199,8 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
11991199 hir:: TraitFn :: Required ( ref names) => self . encode_fn_param_names ( names) ,
12001200 hir:: TraitFn :: Provided ( body) => self . encode_fn_param_names_for_body ( body) ,
12011201 } ;
1202- FnData {
1203- asyncness : m_sig. header . asyncness ,
1204- constness : hir:: Constness :: NotConst ,
1205- param_names,
1206- }
1202+ record ! ( self . tables. asyncness[ def_id] <- m_sig. header. asyncness) ;
1203+ FnData { constness : hir:: Constness :: NotConst , param_names }
12071204 } else {
12081205 bug ! ( )
12091206 } ;
@@ -1264,8 +1261,8 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
12641261 }
12651262 ty:: AssocKind :: Fn => {
12661263 let fn_data = if let hir:: ImplItemKind :: Fn ( ref sig, body) = ast_item. kind {
1264+ record ! ( self . tables. asyncness[ def_id] <- sig. header. asyncness) ;
12671265 FnData {
1268- asyncness : sig. header . asyncness ,
12691266 // Can be inside `impl const Trait`, so using sig.header.constness is not reliable
12701267 constness : if self . tcx . is_const_fn_raw ( def_id) {
12711268 hir:: Constness :: Const
@@ -1407,8 +1404,8 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
14071404 EntryKind :: Const
14081405 }
14091406 hir:: ItemKind :: Fn ( ref sig, .., body) => {
1407+ record ! ( self . tables. asyncness[ def_id] <- sig. header. asyncness) ;
14101408 let data = FnData {
1411- asyncness : sig. header . asyncness ,
14121409 constness : sig. header . constness ,
14131410 param_names : self . encode_fn_param_names_for_body ( body) ,
14141411 } ;
@@ -1876,8 +1873,8 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
18761873
18771874 match nitem. kind {
18781875 hir:: ForeignItemKind :: Fn ( _, ref names, _) => {
1876+ record ! ( self . tables. asyncness[ def_id] <- hir:: IsAsync :: NotAsync ) ;
18791877 let data = FnData {
1880- asyncness : hir:: IsAsync :: NotAsync ,
18811878 constness : if self . tcx . is_const_fn_raw ( def_id) {
18821879 hir:: Constness :: Const
18831880 } else {
0 commit comments