Remove a Clean impl for a tuple (9)
This was the last one!
This commit is contained in:
parent
de5ea80437
commit
e36561dbdd
1 changed files with 48 additions and 43 deletions
|
@ -52,7 +52,11 @@ crate trait Clean<T> {
|
|||
impl Clean<Item> for DocModule<'_> {
|
||||
fn clean(&self, cx: &mut DocContext<'_>) -> Item {
|
||||
let mut items: Vec<Item> = vec![];
|
||||
items.extend(self.foreigns.iter().map(|x| x.clean(cx)));
|
||||
items.extend(
|
||||
self.foreigns
|
||||
.iter()
|
||||
.map(|(item, renamed)| clean_maybe_renamed_foreign_item(cx, item, *renamed)),
|
||||
);
|
||||
items.extend(self.mods.iter().map(|x| x.clean(cx)));
|
||||
items.extend(
|
||||
self.items
|
||||
|
@ -2030,9 +2034,11 @@ fn clean_use_statement(
|
|||
vec![Item::from_def_id_and_parts(import.def_id.to_def_id(), None, ImportItem(inner), cx)]
|
||||
}
|
||||
|
||||
impl Clean<Item> for (&hir::ForeignItem<'_>, Option<Symbol>) {
|
||||
fn clean(&self, cx: &mut DocContext<'_>) -> Item {
|
||||
let (item, renamed) = self;
|
||||
fn clean_maybe_renamed_foreign_item(
|
||||
cx: &mut DocContext<'_>,
|
||||
item: &hir::ForeignItem<'_>,
|
||||
renamed: Option<Symbol>,
|
||||
) -> Item {
|
||||
let def_id = item.def_id.to_def_id();
|
||||
cx.with_param_env(def_id, |cx| {
|
||||
let kind = match item.kind {
|
||||
|
@ -2074,7 +2080,6 @@ impl Clean<Item> for (&hir::ForeignItem<'_>, Option<Symbol>) {
|
|||
)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl Clean<TypeBinding> for hir::TypeBinding<'_> {
|
||||
fn clean(&self, cx: &mut DocContext<'_>) -> TypeBinding {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue