rustbot · GitHub

@rustbot added S-waiting-on-author

Status: This is awaiting some action (such as code changes or more information) from the author.

T-rustdoc

Relevant to the rustdoc team, which will review and decide on the PR/issue.

labels

Jul 20, 2026

rust-bors Bot pushed a commit that referenced this pull request

Jul 20, 2026
rustdoc: Only build extern trait impls if needed
Building inlined impls is expensive, and most of them end up being
unneeded and stripped later in this function. So we should filter them
ahead of time. This requires inlining external auto traits when we
construct auto impls, since this no longer happens as a side effect.
We inline external impls when they are
* for generics (i.e., blanket impls)
* for primitive types (probably this should be handled below really)
* for a type (inlined) in the current crate
* of a trait (inlined) in the current crate
* of `Deref`
These rules are based on the existing filtering rules that are applied
after building the inlined impls.
Now that we do filtering ahead of time, the `BadImplStripper` is
unnecessary. Also, it appears that all this `Deref` logic was pointless
in the first place since following derefs already happens elsewhere in
rustdoc, where it is actually needed.

@camelid

@camelid

camelid marked this pull request as ready for review

July 21, 2026 17:09

@rustbot rustbot removed the S-waiting-on-author

Status: This is awaiting some action (such as code changes or more information) from the author.

label

Jul 21, 2026

@camelid camelid added the relnotes-perf

Performance improvements that should be mentioned in the release notes.

label

Jul 21, 2026

Open

GuillaumeGomez

GuillaumeGomez

notriddle

@rust-bors rust-bors Bot added S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

labels

Jul 22, 2026

@rust-bors

Open

@camelid

Merged

Closed

rust-bors Bot pushed a commit that referenced this pull request

Jul 23, 2026
rustdoc: Only inline impls for local primitives
Previously, the code inlined impls for primitives even if primitives were not defined in the current crate at all. Since most crates do not define `#[doc(primitive)]`s, this is a bunch of wasted work that is done in every crate. Really, rustdoc should have a more pull-based model for inlining impls rather than trying to predict ahead of item what needs to be collected.
This also includes a couple of small perf-related followups to #159623.

github-actions Bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request

Jul 25, 2026
rustdoc: Only inline impls for local primitives
Previously, the code inlined impls for primitives even if primitives were not defined in the current crate at all. Since most crates do not define `#[doc(primitive)]`s, this is a bunch of wasted work that is done in every crate. Really, rustdoc should have a more pull-based model for inlining impls rather than trying to predict ahead of item what needs to be collected.
This also includes a couple of small perf-related followups to rust-lang/rust#159623.

pull Bot pushed a commit to xtqqczze/rust-lang-miri that referenced this pull request

Jul 27, 2026
rustdoc: Only inline impls for local primitives
Previously, the code inlined impls for primitives even if primitives were not defined in the current crate at all. Since most crates do not define `#[doc(primitive)]`s, this is a bunch of wasted work that is done in every crate. Really, rustdoc should have a more pull-based model for inlining impls rather than trying to predict ahead of item what needs to be collected.
This also includes a couple of small perf-related followups to rust-lang/rust#159623.

Read the original on github.com ↗