rust-lang / rust-lang/rust

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

Open
#152,874 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-docs A-rustdoc-ui A-visibility C-bug T-rustdoc T-rustdoc-frontend
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

Code

https://github.com/rust-lang/rust/blob/7f99507f57e6c4aa0dce3daf6a13cca8cd4dd312/library/core/src/ops/control_flow.rs#L425-L446

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)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked impl block in library/core/src/ops/control_flow.rs and compare its private items with the generated ControlFlow documentation at the linked URL. Trace the rustdoc handling that produces the empty-impl note, then verify that the wording distinguishes an impl with no public items from one with no items at all.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.