added
S-waiting-on-author
labels
Jul 20, 2026rust-bors Bot pushed a commit that referenced this pull request
Jul 20, 2026Building 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.
camelid marked this pull request as ready for review
July 21, 2026 17:09
rustbot
removed
the
S-waiting-on-author
label
Jul 21, 2026
camelid
added
the
relnotes-perf
label
Jul 21, 2026Open
rust-bors
Bot
added
S-waiting-on-bors
and removed S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.labels
Jul 22, 2026Merged
Closed
rust-bors Bot pushed a commit that referenced this pull request
Jul 23, 2026rustdoc: 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, 2026rustdoc: 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, 2026rustdoc: 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.