rename is_async_fn to asyncness
This commit is contained in:
parent
9ffb1ce28c
commit
a813cc1bf1
6 changed files with 13 additions and 21 deletions
|
|
@ -133,7 +133,7 @@ provide! { <'tcx> tcx, def_id, other, cdata,
|
|||
fn_sig => { cdata.fn_sig(def_id.index, tcx) }
|
||||
inherent_impls => { cdata.get_inherent_implementations_for_type(tcx, def_id.index) }
|
||||
is_const_fn_raw => { cdata.is_const_fn_raw(def_id.index) }
|
||||
is_async_fn => { cdata.is_async_fn(def_id.index) }
|
||||
asyncness => { cdata.asyncness(def_id.index) }
|
||||
is_foreign_item => { cdata.is_foreign_item(def_id.index) }
|
||||
static_mutability => { cdata.static_mutability(def_id.index) }
|
||||
def_kind => { cdata.def_kind(def_id.index) }
|
||||
|
|
|
|||
|
|
@ -1208,13 +1208,12 @@ impl<'a, 'tcx> CrateMetadata {
|
|||
constness == hir::Constness::Const
|
||||
}
|
||||
|
||||
pub fn is_async_fn(&self, id: DefIndex) -> bool {
|
||||
let asyncness = match self.entry(id).kind {
|
||||
pub fn asyncness(&self, id: DefIndex) -> hir::IsAsync {
|
||||
match self.entry(id).kind {
|
||||
EntryKind::Fn(data) => data.decode(self).asyncness,
|
||||
EntryKind::Method(data) => data.decode(self).fn_data.asyncness,
|
||||
_ => hir::IsAsync::NotAsync,
|
||||
};
|
||||
asyncness == hir::IsAsync::Async
|
||||
}
|
||||
}
|
||||
|
||||
pub fn is_foreign_item(&self, id: DefIndex) -> bool {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue