rename is_async_fn to asyncness
This commit is contained in:
parent
9ffb1ce28c
commit
a813cc1bf1
6 changed files with 13 additions and 21 deletions
|
|
@ -217,11 +217,7 @@ fn build_external_function(cx: &DocContext<'_>, did: DefId) -> clean::Function {
|
|||
} else {
|
||||
hir::Constness::NotConst
|
||||
};
|
||||
let asyncness = if cx.tcx.is_async_fn(did) {
|
||||
hir::IsAsync::Async
|
||||
} else {
|
||||
hir::IsAsync::NotAsync
|
||||
};
|
||||
let asyncness = cx.tcx.asyncness(did);
|
||||
let predicates = cx.tcx.predicates_of(did);
|
||||
let (generics, decl) = clean::enter_impl_trait(cx, || {
|
||||
((cx.tcx.generics_of(did), &predicates).clean(cx), (did, sig).clean(cx))
|
||||
|
|
|
|||
|
|
@ -2403,11 +2403,7 @@ impl Clean<Item> for ty::AssocItem {
|
|||
} else {
|
||||
hir::Constness::NotConst
|
||||
};
|
||||
let asyncness = if cx.tcx.is_async_fn(self.def_id) {
|
||||
hir::IsAsync::Async
|
||||
} else {
|
||||
hir::IsAsync::NotAsync
|
||||
};
|
||||
let asyncness = cx.tcx.asyncness(self.def_id);
|
||||
let defaultness = match self.container {
|
||||
ty::ImplContainer(_) => Some(self.defaultness),
|
||||
ty::TraitContainer(_) => None,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue