@@ -875,7 +875,7 @@ impl EncodeContext<'tcx> {
875
875
EntryKind :: AssocConst ( container, const_qualif, rendered_const)
876
876
}
877
877
ty:: AssocKind :: Method => {
878
- let fn_data = if let hir:: TraitItemKind :: Method ( _ , ref m) = ast_item. node {
878
+ let fn_data = if let hir:: TraitItemKind :: Method ( method_sig , m) = & ast_item. node {
879
879
let param_names = match * m {
880
880
hir:: TraitMethod :: Required ( ref names) => {
881
881
self . encode_fn_param_names ( names)
@@ -885,6 +885,7 @@ impl EncodeContext<'tcx> {
885
885
}
886
886
} ;
887
887
FnData {
888
+ asyncness : method_sig. header . asyncness ,
888
889
constness : hir:: Constness :: NotConst ,
889
890
param_names,
890
891
sig : self . lazy ( & tcx. fn_sig ( def_id) ) ,
@@ -982,6 +983,7 @@ impl EncodeContext<'tcx> {
982
983
ty:: AssocKind :: Method => {
983
984
let fn_data = if let hir:: ImplItemKind :: Method ( ref sig, body) = ast_item. node {
984
985
FnData {
986
+ asyncness : sig. header . asyncness ,
985
987
constness : sig. header . constness ,
986
988
param_names : self . encode_fn_param_names_for_body ( body) ,
987
989
sig : self . lazy ( & tcx. fn_sig ( def_id) ) ,
@@ -1128,6 +1130,7 @@ impl EncodeContext<'tcx> {
1128
1130
}
1129
1131
hir:: ItemKind :: Fn ( _, header, .., body) => {
1130
1132
let data = FnData {
1133
+ asyncness : header. asyncness ,
1131
1134
constness : header. constness ,
1132
1135
param_names : self . encode_fn_param_names_for_body ( body) ,
1133
1136
sig : self . lazy ( tcx. fn_sig ( def_id) ) ,
@@ -1677,6 +1680,7 @@ impl EncodeContext<'tcx> {
1677
1680
let kind = match nitem. node {
1678
1681
hir:: ForeignItemKind :: Fn ( _, ref names, _) => {
1679
1682
let data = FnData {
1683
+ asyncness : hir:: IsAsync :: NotAsync ,
1680
1684
constness : hir:: Constness :: NotConst ,
1681
1685
param_names : self . encode_fn_param_names ( names) ,
1682
1686
sig : self . lazy ( tcx. fn_sig ( def_id) ) ,
0 commit comments