Skip to content

Confusing "This impl block contains no items." with non-public functions #152874

@DanielEScherzer

Description

@DanielEScherzer

Code

/// These are used only as part of implementing the iterator adapters.
/// They have mediocre names and non-obvious semantics, so aren't
/// currently on a path to potential stabilization.
impl<R: ops::Try> ControlFlow<R, R::Output> {
/// Creates a `ControlFlow` from any type implementing `Try`.
#[inline]
pub(crate) fn from_try(r: R) -> Self {
match R::branch(r) {
ControlFlow::Continue(v) => ControlFlow::Continue(v),
ControlFlow::Break(v) => ControlFlow::Break(R::from_residual(v)),
}
}
/// Converts a `ControlFlow` into any type implementing `Try`.
#[inline]
pub(crate) fn into_try(self) -> R {
match self {
ControlFlow::Continue(v) => R::from_output(v),
ControlFlow::Break(v) => v,
}
}
}

Reproduction Steps

However the docs on doc.rust-lang.org are built - linking to 1.93.1 version of the reference but present on the latest nightly

Expected Outcome

Perhaps something like (bolding add to indicate change)

This impl block contains no public items.

Actual Output

See https://doc.rust-lang.org/1.93.1/std/ops/enum.ControlFlow.html#impl-ControlFlow%3CR,+%3CR+as+Try%3E::Output%3E - includes a note

This impl block contains no items.

but if you look at the source there are items, they are just pub(crate) which I assume is why they are not shown

Version

rustdoc 1.93.1 (01f6ddf75 2026-02-11)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsA-rustdoc-uiArea: Rustdoc UI (generated HTML)A-visibilityArea: Visibility / privacyC-bugCategory: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.T-rustdoc-frontendRelevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions