diff --git a/src/librustdoc/clean/types.rs b/src/librustdoc/clean/types.rs index ee6cb292cbebe..0dc1c24b16e19 100644 --- a/src/librustdoc/clean/types.rs +++ b/src/librustdoc/clean/types.rs @@ -2182,18 +2182,6 @@ crate struct Impl { } impl Impl { - crate fn is_auto_impl(&self) -> bool { - self.kind.is_auto() - } - - crate fn is_blanket_impl(&self) -> bool { - self.kind.is_blanket() - } - - crate fn blanket_impl_ty(&self) -> Option<&Type> { - self.kind.as_blanket_ty() - } - crate fn provided_trait_methods(&self, tcx: TyCtxt<'_>) -> FxHashSet { self.trait_ .as_ref() diff --git a/src/librustdoc/formats/cache.rs b/src/librustdoc/formats/cache.rs index 2a3998f4f9d66..a929cd094f8c3 100644 --- a/src/librustdoc/formats/cache.rs +++ b/src/librustdoc/formats/cache.rs @@ -228,7 +228,7 @@ impl<'a, 'tcx> DocFolder for CacheBuilder<'a, 'tcx> { // Collect all the implementors of traits. if let clean::ImplItem(ref i) = *item.kind { if let Some(trait_) = &i.trait_ { - if !i.is_blanket_impl() { + if !i.kind.is_blanket() { self.cache .implementors .entry(trait_.def_id()) diff --git a/src/librustdoc/html/format.rs b/src/librustdoc/html/format.rs index a56fcfefb21ae..4f2049132046d 100644 --- a/src/librustdoc/html/format.rs +++ b/src/librustdoc/html/format.rs @@ -999,7 +999,7 @@ impl clean::Impl { write!(f, " for ")?; } - if let Some(ref ty) = self.blanket_impl_ty() { + if let Some(ref ty) = self.kind.as_blanket_ty() { fmt_type(ty, f, use_absolute, cx)?; } else { fmt_type(&self.for_, f, use_absolute, cx)?; diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs index 841943a79898e..fdadc68998dc6 100644 --- a/src/librustdoc/html/render/mod.rs +++ b/src/librustdoc/html/render/mod.rs @@ -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::, _>(|i| i.inner_impl().is_auto_impl()); + v.iter().partition::, _>(|i| i.inner_impl().kind.is_auto()); let (blanket_impl, concrete): (Vec<&Impl>, Vec<&Impl>) = - concrete.into_iter().partition::, _>(|i| i.inner_impl().is_blanket_impl()); + concrete.into_iter().partition::, _>(|i| i.inner_impl().kind.is_blanket()); let concrete_format = format_impls(concrete); let synthetic_format = format_impls(synthetic); diff --git a/src/librustdoc/html/render/print_item.rs b/src/librustdoc/html/render/print_item.rs index 10afe18b33c6d..7ef773fe5ff29 100644 --- a/src/librustdoc/html/render/print_item.rs +++ b/src/librustdoc/html/render/print_item.rs @@ -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)); diff --git a/src/librustdoc/html/render/write_shared.rs b/src/librustdoc/html/render/write_shared.rs index cf12d668569fb..2d3b2490677e9 100644 --- a/src/librustdoc/html/render/write_shared.rs +++ b/src/librustdoc/html/render/write_shared.rs @@ -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), }) }