Rustdoc "Auto Trait Implementations" is showing private types instead of the relevant generic bounds
@fmease is already working on this.
Since Sep 4, 2026.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Code
pub struct Foo<T>(Bar<T>);
struct Bar<T>(Box<T>);
Or, see a standard library type such as Vec.
Reproduction Steps
cargo doc --open- Visit the "Auto Traits" section of
Foo
OR
Expected Outcome
Auto trait implementations should, as they do on stable, show their bounds in terms of the generics of the type.
impl<T> Send for Foo<T>
where
T: Send,
impl<T, A> Send for Vec<T, A>
where
A: Send,
T: Send,
Actual Output
impl<T> Send for Foo<T>
where
Bar<T>: Send,
Bar is a private type and should not appear in the documentation.
impl<T, A> Send for Vec<T, A>
where
RawVec<T, A>: Send,
RawVec is a private type and should not appear in the documentation.
This prevents users from understanding what the actual bounds on the impl are, because Bar and RawVec may have bounds that are not the obvious ones.
Version
rustdoc 1.100.0-nightly (2e2b193f8 2026-09-02)
Does not reproduce on 1.98.0 or 1.99.0-beta.3 (cbae9b4ca 2026-08-28)
Additional Details
@rustbot label regression-from-stable-to-nightly
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.