Change:
for example lists implementations of in , which aren't visible anyway and the links are also broken.
Not present in the docs for 1.77.2, regression?
cc getting multiple reports of this:
I believe this regressed in (
This was closed but it's still happening on current stable docs, in various traits, Debug being the one that seems the worst: ! !
What page are you looking at? I do not see those implementations on
stable docs, not nightly I understand this was reported the day 1.78.0 was released and 1.79.0 isn't due for a few weeks more, but I feel it should be possible to apply the fix to the current stable docs at least as published on rust- in the meantime
The stable docs are tied to the release, so we would have to make a new release to update them. The fix for this is in 1.80, and will reach stable on July 25.
There's no way to backport it internally? That's unfortunate. I was hoping it would land for 1.79.0 at least
Closing then.
This can in fact be beta backported.
And it was in
Good to know, thank you

Discussion:
use rustc_metadata::creader::{CStore, LoadedMacro}; use rustc_middle::ty::fast_reject::SimplifiedType; use rustc_middle::ty::{self, TyCtxt}; <ins> use rustc_span::def_id::LOCAL_CRATE; </ins> use rustc_span::hygiene::MacroKind; use rustc_span::symbol::{kw, sym, Symbol};

let associated_trait = tcx.impl_trait_ref(did).map(ty::EarlyBinder::skip_binder); <ins> // Do not inline compiler-internal items unless we're a compiler-internal crate. let is_compiler_internal = |did| { tcx.lookup_stability(did) .is_some_and(|stab| stab.is_unstable() && stab.feature == sym::rustc_private) }; let document_compiler_internal = is_compiler_internal(LOCAL_CRATE.as_def_id()); let is_directly_public = |cx: &mut DocContext<'_>, did| { cx.cache.effective_visibilities.is_directly_public(tcx, did) && (document_compiler_internal || !is_compiler_internal(did)) }; </ins> // Only inline impl if the implemented trait is // reachable in rustdoc generated documentation if !did.is_local() && let Some(traitref) = associated_trait <ins> && !is_directly_public(cx, traitref.def_id) </ins> { <del> let did = traitref.def_id; if !cx.cache.effective_visibilities.is_directly_public(tcx, did) { return; } if !tcx.features().rustc_private && !cx.render_options.force_unstable_if_unmarked { if let Some(stab) = tcx.lookup_stability(did) && stab.is_unstable() && stab.feature == sym::rustc_private { return; } } </del> <ins> return; </ins> } let impl_item = match did.as_local() {

// Only inline impl if the implementing type is // reachable in rustdoc generated documentation <del> if !did.is_local() { if let Some(did) = for_.def_id(&cx.cache) { if !cx.cache.effective_visibilities.is_directly_public(tcx, did) { return; } if !tcx.features().rustc_private && !cx.render_options.force_unstable_if_unmarked { if let Some(stab) = tcx.lookup_stability(did) && stab.is_unstable() && stab.feature == sym::rustc_private { return; } } } </del> <ins> if !did.is_local() && let Some(did) = for_.def_id(&cx.cache) && !is_directly_public(cx, did) { return; </ins> } let document_hidden = cx.render_options.document_hidden;

pub(crate) no_emit_shared: bool, /// If `true`, HTML source code pages won't be generated. pub(crate) html_no_source: bool, <del> /// Whether `-Zforce-unstable-if-unmarked` unstable option is set pub(crate) force_unstable_if_unmarked: bool, </del> } #[derive(Copy, Clone, Debug, PartialEq, Eq)]

let codegen_options = CodegenOptions::build(early_dcx, matches); let unstable_opts = UnstableOptions::build(early_dcx, matches); <del> let force_unstable_if_unmarked = unstable_opts.force_unstable_if_unmarked; </del> let dcx = new_dcx(error_format, None, diagnostic_width, &unstable_opts);

call_locations, no_emit_shared: false, html_no_source, <del> force_unstable_if_unmarked, </del> }; Some((options, render_options)) }

//@ aux-build:issue-76736-1.rs //@ aux-build:issue-76736-2.rs <ins> // https://github.com/rust-lang/rust/issues/124635 </ins> #![crate_name = "foo"] #![feature(rustc_private)]

extern crate issue_76736_2; // @has foo/struct.Foo.html <del> // @has - '//*[@class="impl"]//h3[@class="code-header"]' 'MaybeResult' </del> <ins> // @!has - '//*[@class="impl"]//h3[@class="code-header"]' 'MaybeResult' </ins> pub struct Foo; // @has foo/struct.Bar.html <del> // @has - '//*[@class="impl"]//h3[@class="code-header"]' 'MaybeResult' </del> <ins> // @!has - '//*[@class="impl"]//h3[@class="code-header"]' 'MaybeResult' </ins> pub use issue_76736_2::Bar;

<ins> //@ aux-build:issue-76736-1.rs //@ aux-build:issue-76736-2.rs // https://github.com/rust-lang/rust/issues/124635 #![crate_name = "foo"] #![feature(rustc_private, staged_api)] #![unstable(feature = "rustc_private", issue = "none")] extern crate issue_76736_1; extern crate issue_76736_2; // @has foo/struct.Foo.html // @has - '//*[@class="impl"]//h3[@class="code-header"]' 'MaybeResult' pub struct Foo; // @has foo/struct.Bar.html // @has - '//*[@class="impl"]//h3[@class="code-header"]' 'MaybeResult' pub use issue_76736_2::Bar; </ins>