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.

@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

This comment has been minimized.

bors added a commit that referenced this pull request Nov 11, 2025
…aumeGomez

rustdoc: Don't pass `RenderOptions` to `DocContext`

`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
@bors
Copy link
Collaborator

bors commented Nov 11, 2025

⌛ Testing commit 6f1cecf with merge ae7173e...

@fmease
Copy link
Member

fmease commented Nov 11, 2025

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 11, 2025
@bors
Copy link
Collaborator

bors commented Nov 11, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 11, 2025
@rust-cloud-vms rust-cloud-vms bot force-pushed the rustdoc-format-options branch from 6f1cecf to 42bdde1 Compare November 11, 2025 21:58
@rust-log-analyzer

This comment has been minimized.

`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 42bdde1 to b808f33 Compare November 11, 2025 22:00
@aDotInTheVoid
Copy link
Member Author

@bors r=GuillaumeGomez

@bors
Copy link
Collaborator

bors commented Nov 11, 2025

📌 Commit b808f33 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
@aDotInTheVoid
Copy link
Member Author

@bors rollup=always

Zalathar added a commit to Zalathar/rust that referenced this pull request Nov 12, 2025
…ns, r=GuillaumeGomez

rustdoc: Don't pass `RenderOptions` to `DocContext`

`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
bors added a commit that referenced this pull request Nov 12, 2025
Rollup of 16 pull requests

Successful merges:

 - #146627 (Simplify `jemalloc` setup)
 - #147753 (Suggest add bounding value for RangeTo)
 - #147832 (rustdoc: Don't pass `RenderOptions` to `DocContext`)
 - #147974 (Improve diagnostics for buffer reuse with borrowed references)
 - #148080 ([rustdoc] Fix invalid jump to def macro link generation)
 - #148465 (Adjust spans into the `for` loops context before creating the new desugaring spans.)
 - #148500 (Update git index before running diff-index)
 - #148531 (rustc_target: introduce Abi, Env, Os)
 - #148536 (cmse: add test for `async` and `const` functions)
 - #148770 (implement `feature(c_variadic_naked_functions)`)
 - #148780 (fix filecheck typos in tests)
 - #148819 (Remove specialized warning for removed target)
 - #148830 (miri subtree update)
 - #148833 (Update rustbook dependencies)
 - #148834 (fix(rustdoc): Color doctest errors)
 - #148841 (Remove more `#[must_use]` from portable-simd)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 203130b into rust-lang:main Nov 12, 2025
11 checks passed
@rustbot rustbot added this to the 1.93.0 milestone Nov 12, 2025
rust-timer added a commit that referenced this pull request Nov 12, 2025
Rollup merge of #147832 - aDotInTheVoid:rustdoc-format-options, r=GuillaumeGomez

rustdoc: Don't pass `RenderOptions` to `DocContext`

`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
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Nov 12, 2025
Rollup of 16 pull requests

Successful merges:

 - rust-lang/rust#146627 (Simplify `jemalloc` setup)
 - rust-lang/rust#147753 (Suggest add bounding value for RangeTo)
 - rust-lang/rust#147832 (rustdoc: Don't pass `RenderOptions` to `DocContext`)
 - rust-lang/rust#147974 (Improve diagnostics for buffer reuse with borrowed references)
 - rust-lang/rust#148080 ([rustdoc] Fix invalid jump to def macro link generation)
 - rust-lang/rust#148465 (Adjust spans into the `for` loops context before creating the new desugaring spans.)
 - rust-lang/rust#148500 (Update git index before running diff-index)
 - rust-lang/rust#148531 (rustc_target: introduce Abi, Env, Os)
 - rust-lang/rust#148536 (cmse: add test for `async` and `const` functions)
 - rust-lang/rust#148770 (implement `feature(c_variadic_naked_functions)`)
 - rust-lang/rust#148780 (fix filecheck typos in tests)
 - rust-lang/rust#148819 (Remove specialized warning for removed target)
 - rust-lang/rust#148830 (miri subtree update)
 - rust-lang/rust#148833 (Update rustbook dependencies)
 - rust-lang/rust#148834 (fix(rustdoc): Color doctest errors)
 - rust-lang/rust#148841 (Remove more `#[must_use]` from portable-simd)

r? `@ghost`
`@rustbot` modify labels: rollup
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