Skip to content

Conversation

@fmease
Copy link
Member

@fmease fmease commented Jan 17, 2026

See the descriptions of the added tests for details.

Fixes #131625.
Fixes [after beta-1.93 backport] #149635.
Fixes #150312.

Supersedes #150629 IINM.

CC @cuviper (#149635 (comment))
r? @GuillaumeGomez or @yotamofek (#150629)

@fmease fmease added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Jan 17, 2026
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Jan 17, 2026
@fmease fmease added beta-nominated Nominated for backporting to the compiler in the beta channel. and removed beta-nominated Nominated for backporting to the compiler in the beta channel. labels Jan 17, 2026
@fmease fmease force-pushed the rustdoc-dont-eval-assoc-consts branch from ab8d394 to 1aacbfc Compare January 17, 2026 00:32
@fmease
Copy link
Member Author

fmease commented Jan 17, 2026

This should theoretically have a positive impact on performance.

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Jan 17, 2026
rustdoc: Stop evaluating associated consts
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jan 17, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 17, 2026

☀️ Try build successful (CI)
Build commit: 9e129b1 (9e129b1955e6060a281ffcd69c9d4ab002b6384c, parent: f6a07efc81e4b5a9166884f50c2cb1686009c3fd)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (9e129b1): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.3% [-0.3%, -0.2%] 3
Improvements ✅
(secondary)
-29.6% [-29.6%, -29.6%] 1
All ❌✅ (primary) -0.3% [-0.3%, -0.2%] 3

Max RSS (memory usage)

Results (primary -2.2%, secondary -4.8%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.2% [-3.2%, -1.2%] 2
Improvements ✅
(secondary)
-4.8% [-4.8%, -4.8%] 1
All ❌✅ (primary) -2.2% [-3.2%, -1.2%] 2

Cycles

Results (primary -1.5%, secondary -19.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.5% [-1.5%, -1.5%] 1
Improvements ✅
(secondary)
-19.1% [-36.2%, -1.9%] 2
All ❌✅ (primary) -1.5% [-1.5%, -1.5%] 1

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 472.76s -> 472.975s (0.05%)
Artifact size: 383.52 MiB -> 383.51 MiB (-0.00%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jan 17, 2026
@fmease fmease force-pushed the rustdoc-dont-eval-assoc-consts branch from 1aacbfc to 1175147 Compare January 17, 2026 09:05
@yotamofek
Copy link
Contributor

Nice! And simple enough to backport :)
r=me once CI is green.

@fmease fmease changed the title rustdoc: Stop evaluating associated consts rustdoc: Stop unconditionally evaluating the initializer of associated consts Jan 17, 2026
@fmease fmease force-pushed the rustdoc-dont-eval-assoc-consts branch from 1175147 to ac8e850 Compare January 17, 2026 11:13
@fmease
Copy link
Member Author

fmease commented Jan 17, 2026

CI was green but I've just force-pushed again to tweak the commit message slightly.

r? yotamofek @bors r=yotamofek

@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 17, 2026

📌 Commit ac8e850 has been approved by yotamofek

It is now in the queue for this repository.

@rust-bors rust-bors bot added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jan 17, 2026
@rust-bors rust-bors bot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 17, 2026
@fmease
Copy link
Member Author

fmease commented Jan 17, 2026

Beta backport accepted as per #t-rustdoc > beta-nominated: #151232 @ 💬.

@fmease fmease added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Jan 17, 2026
@fmease fmease added this to the 1.93.0 milestone Jan 17, 2026
@fmease fmease removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Jan 17, 2026
rust-bors bot pushed a commit that referenced this pull request Jan 17, 2026
…=fmease

[beta] rustdoc: Stop unconditionally evaluating the initializer of associated consts

Last minute beta backport of #151232 ([beta backport accepted](https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/beta-nominated.3A.20.23151232/near/568543129)).
Directly fixes #149635.

Not part of some hypothetical future backport rollup because we're under time pressure as the release procedures have commenced already: https://forge.rust-lang.org/#current-release-versions, https://forge.rust-lang.org/release/process.html.

r? fmease
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beta-accepted Accepted for backporting to the compiler in the beta channel. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Weird representation of trait const of associated type rustdoc panics while documenting panicking associated constant

5 participants