Skip to content

Conversation

@aDotInTheVoid
Copy link
Member

RenderOptions is full of HTML specific fields. The only ones that DocContext needs are document_private and document_hidden, which are accessable via Cache anyway.

Part of a larger campeign against RenderOption:
https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/Using.20.60RenderOptions.60.20in.20less.20places.2E/with/545705812

@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. labels Oct 17, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 17, 2025

r? @notriddle

rustbot has assigned @notriddle.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@aDotInTheVoid aDotInTheVoid added the C-cleanup Category: PRs that clean code up or issues documenting cleanup. label Oct 17, 2025

// Remnence of processing crate attributes for passes to run.
// To be removed in https://github.com/rust-lang/rust/pull/146495.
if clean::hir_attr_lists(tcx.get_all_attrs(rustc_hir::def_id::CRATE_DEF_ID), sym::doc)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CC @fmease. I'd rather this didn't need to wait for the FCP in #146495, so I've moved the code here. As noted, it has no tests 👻

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine by me. Ideally my PR would've come first but alas. The source code comment is a bit too assertive, after all the pFCP-merge might not go through.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fmease
Copy link
Member

fmease commented Oct 31, 2025

(just double-checking)

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Oct 31, 2025
rustdoc: Don't pass `RenderOptions` to `DocContext`
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 31, 2025
@rust-bors
Copy link

rust-bors bot commented Oct 31, 2025

☀️ Try build successful (CI)
Build commit: 64dd2c7 (64dd2c7a3a0c0326d0673dbc173b2a96a5c1cbdd, parent: d5419f1e97b90741d51841f800d3c697c662567d)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (64dd2c7): comparison URL.

Overall result: no relevant changes - 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

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

Max RSS (memory usage)

Results (secondary -4.3%)

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)
- - 0
Improvements ✅
(secondary)
-4.3% [-4.5%, -4.1%] 2
All ❌✅ (primary) - - 0

Cycles

Results (secondary -2.4%)

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)
- - 0
Improvements ✅
(secondary)
-2.4% [-2.4%, -2.4%] 1
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 473.872s -> 476.054s (0.46%)
Artifact size: 390.40 MiB -> 390.34 MiB (-0.02%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 31, 2025
@rust-cloud-vms rust-cloud-vms bot force-pushed the rustdoc-format-options branch from abb2d75 to 937ecd5 Compare October 31, 2025 18:14
@fmease
Copy link
Member

fmease commented Nov 10, 2025

Blocked on #146495 getting merged.

@rust-cloud-vms rust-cloud-vms bot force-pushed the rustdoc-format-options branch from 937ecd5 to 3a7fca7 Compare November 11, 2025 18:26
@rustbot
Copy link
Collaborator

rustbot commented Nov 11, 2025

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

`RenderOptions` is full of HTML specific fields. The only ones that
`DocContext` needs are `document_private` and `document_hidden`, which
are accessable via `Cache` anyway.

Part of a larger campeign against `RenderOptions`:
https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/Using.20.60RenderOptions.60.20in.20less.20places.2E/with/545705812
@rust-cloud-vms rust-cloud-vms bot force-pushed the rustdoc-format-options branch from 3a7fca7 to 6f1cecf Compare November 11, 2025 18:27
@aDotInTheVoid
Copy link
Member Author

Rebased.

@bors r=GuillaumeGomez

@bors
Copy link
Collaborator

bors commented Nov 11, 2025

📌 Commit 6f1cecf has been approved by GuillaumeGomez

It is now in the queue for this repository.

@bors bors 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 Nov 11, 2025
@rust-log-analyzer
Copy link
Collaborator

The job pr-check-2 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)

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

Labels

C-cleanup Category: PRs that clean code up or issues documenting cleanup. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants