rustdoc: Remove top-level wrappers for ImplKind methods
The `ImplKind` methods can just be used directly instead.
This commit is contained in:
parent
7c7bf451eb
commit
b5817fada2
6 changed files with 8 additions and 20 deletions
|
|
@ -1148,9 +1148,9 @@ fn render_assoc_items_inner(
|
|||
}
|
||||
|
||||
let (synthetic, concrete): (Vec<&&Impl>, Vec<&&Impl>) =
|
||||
traits.iter().partition(|t| t.inner_impl().is_auto_impl());
|
||||
traits.iter().partition(|t| t.inner_impl().kind.is_auto());
|
||||
let (blanket_impl, concrete): (Vec<&&Impl>, _) =
|
||||
concrete.into_iter().partition(|t| t.inner_impl().is_blanket_impl());
|
||||
concrete.into_iter().partition(|t| t.inner_impl().kind.is_blanket());
|
||||
|
||||
let mut impls = Buffer::empty_from(w);
|
||||
render_impls(cx, &mut impls, &concrete, containing_item);
|
||||
|
|
@ -2059,9 +2059,9 @@ fn sidebar_assoc_items(cx: &Context<'_>, out: &mut Buffer, it: &clean::Item) {
|
|||
};
|
||||
|
||||
let (synthetic, concrete): (Vec<&Impl>, Vec<&Impl>) =
|
||||
v.iter().partition::<Vec<_>, _>(|i| i.inner_impl().is_auto_impl());
|
||||
v.iter().partition::<Vec<_>, _>(|i| i.inner_impl().kind.is_auto());
|
||||
let (blanket_impl, concrete): (Vec<&Impl>, Vec<&Impl>) =
|
||||
concrete.into_iter().partition::<Vec<_>, _>(|i| i.inner_impl().is_blanket_impl());
|
||||
concrete.into_iter().partition::<Vec<_>, _>(|i| i.inner_impl().kind.is_blanket());
|
||||
|
||||
let concrete_format = format_impls(concrete);
|
||||
let synthetic_format = format_impls(synthetic);
|
||||
|
|
|
|||
|
|
@ -746,7 +746,7 @@ fn item_trait(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, t: &clean::Tra
|
|||
});
|
||||
|
||||
let (mut synthetic, mut concrete): (Vec<&&Impl>, Vec<&&Impl>) =
|
||||
local.iter().partition(|i| i.inner_impl().is_auto_impl());
|
||||
local.iter().partition(|i| i.inner_impl().kind.is_auto());
|
||||
|
||||
synthetic.sort_by(|a, b| compare_impl(a, b, cx));
|
||||
concrete.sort_by(|a, b| compare_impl(a, b, cx));
|
||||
|
|
|
|||
|
|
@ -585,7 +585,7 @@ pub(super) fn write_shared(
|
|||
} else {
|
||||
Some(Implementor {
|
||||
text: imp.inner_impl().print(false, cx).to_string(),
|
||||
synthetic: imp.inner_impl().is_auto_impl(),
|
||||
synthetic: imp.inner_impl().kind.is_auto(),
|
||||
types: collect_paths_for_type(imp.inner_impl().for_.clone(), cache),
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue