Skip to content

Commit 1d09545

Browse files
authored
Rollup merge of rust-lang#100370 - GuillaumeGomez:rm-more-clean-impls, r=Dylan-DPC
Remove more Clean trait implementations Follow-up of rust-lang#99638. r? `@Dylan-DPC`
2 parents b5f5bdc + 0cd06fb commit 1d09545

File tree

3 files changed

+213
-202
lines changed

3 files changed

+213
-202
lines changed

src/librustdoc/clean/blanket_impl.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ impl<'a, 'tcx> BlanketImplFinder<'a, 'tcx> {
120120
items: cx.tcx
121121
.associated_items(impl_def_id)
122122
.in_definition_order()
123-
.map(|x| x.clean(cx))
123+
.map(|x| clean_middle_assoc_item(x, cx))
124124
.collect::<Vec<_>>(),
125125
polarity: ty::ImplPolarity::Positive,
126126
kind: ImplKind::Blanket(Box::new(clean_middle_ty(trait_ref.0.self_ty(), cx, None))),

src/librustdoc/clean/inline.rs

+6-5
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ use rustc_span::hygiene::MacroKind;
1616
use rustc_span::symbol::{kw, sym, Symbol};
1717

1818
use crate::clean::{
19-
self, clean_fn_decl_from_did_and_sig, clean_generics, clean_impl_item, clean_middle_field,
20-
clean_middle_ty, clean_trait_ref_with_bindings, clean_ty, clean_ty_generics, clean_variant_def,
21-
clean_visibility, utils, Attributes, AttributesExt, Clean, ImplKind, ItemId, Type, Visibility,
19+
self, clean_fn_decl_from_did_and_sig, clean_generics, clean_impl_item, clean_middle_assoc_item,
20+
clean_middle_field, clean_middle_ty, clean_trait_ref_with_bindings, clean_ty,
21+
clean_ty_generics, clean_variant_def, clean_visibility, utils, Attributes, AttributesExt,
22+
ImplKind, ItemId, Type, Visibility,
2223
};
2324
use crate::core::DocContext;
2425
use crate::formats::item_type::ItemType;
@@ -217,7 +218,7 @@ pub(crate) fn build_external_trait(cx: &mut DocContext<'_>, did: DefId) -> clean
217218
// which causes methods to have a `pub` prefix, which is invalid since items in traits
218219
// can not have a visibility prefix. Thus we override the visibility here manually.
219220
// See https://github.com/rust-lang/rust/issues/81274
220-
clean::Item { visibility: Visibility::Inherited, ..item.clean(cx) }
221+
clean::Item { visibility: Visibility::Inherited, ..clean_middle_assoc_item(item, cx) }
221222
})
222223
.collect();
223224

@@ -452,7 +453,7 @@ pub(crate) fn build_impl(
452453
item.visibility(tcx).is_public()
453454
}
454455
})
455-
.map(|item| item.clean(cx))
456+
.map(|item| clean_middle_assoc_item(item, cx))
456457
.collect::<Vec<_>>(),
457458
clean::enter_impl_trait(cx, |cx| {
458459
clean_ty_generics(cx, tcx.generics_of(did), predicates)

0 commit comments

Comments
 (0)