Skip to content

Make render_example_with_highlighting return an impl fmt::Display - #146933

Merged
bors merged 3 commits into
rust-lang:masterfrom
yotamofek:pr/rustdoc/highlight_no_write_str
Sep 25, 2025
Merged

Make render_example_with_highlighting return an impl fmt::Display#146933
bors merged 3 commits into
rust-lang:masterfrom
yotamofek:pr/rustdoc/highlight_no_write_str

Conversation

@yotamofek

Copy link
Copy Markdown
Contributor

Removes some more usages of write_str. Shouldn't affect runtime, but makes the codebase a bit more consistent.
Each commit can be reviewed separately

@rustbotrustbot 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 Sep 23, 2025
@rustbot

Copy link
Copy Markdown
Collaborator

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

@GuillaumeGomez

Copy link
Copy Markdown
Member

Looks good to me, thanks! Perf-check time. =D

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

rust-borsBot added a commit that referenced this pull request Sep 25, 2025
…r=<try>
Make `render_example_with_highlighting` return an `impl fmt::Display`
@rust-bors

This comment has been minimized.

@rustbotrustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Sep 25, 2025
@rust-bors

rust-borsBot commented Sep 25, 2025

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 32de303 (32de30357cb49eeb4dbd3c0a538472a455eb1cd2, parent: bbcbc7818ba27c951f9fd881fd3ec4cd5123b741)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (32de303): 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.

meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
-0.2%[-0.3%, -0.2%]2
All ❌✅ (primary)--0

Max RSS (memory usage)

Results (primary 4.2%, secondary -0.6%)

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

meanrangecount
Regressions ❌
(primary)
4.2%[4.2%, 4.2%]1
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
-0.6%[-0.6%, -0.6%]3
All ❌✅ (primary)4.2%[4.2%, 4.2%]1

Cycles

Results (primary 3.0%)

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

meanrangecount
Regressions ❌
(primary)
3.0%[3.0%, 3.0%]1
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
--0
All ❌✅ (primary)3.0%[3.0%, 3.0%]1

Binary size

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

Bootstrap: 470.723s -> 471.395s (0.14%)
Artifact size: 388.07 MiB -> 388.04 MiB (-0.01%)

@rustbotrustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Sep 25, 2025
@GuillaumeGomez

Copy link
Copy Markdown
Member

No changes indeed. Thanks!

@bors r+ rollup

@bors

bors commented Sep 25, 2025

Copy link
Copy Markdown
Collaborator

📌 Commit e697f20 has been approved by GuillaumeGomez

It is now in the queue for this repository.

@borsbors 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 Sep 25, 2025
bors added a commit that referenced this pull request Sep 25, 2025
Rollup of 8 pull requests
Successful merges:
- #116882 (rustdoc: hide `#[repr]` if it isn't part of the public ABI)
- #135771 ([rustdoc] Add support for associated items in "jump to def" feature)
- #141032 (avoid violating `slice::from_raw_parts` safety contract in `Vec::extract_if`)
- #142401 (Add proper name mangling for pattern types)
- #146293 (feat: non-panicking `Vec::try_remove`)
- #146859 (BTreeMap: Don't leak allocators when initializing nodes)
- #146924 (Add doc for `NonZero*` const creation)
- #146933 (Make `render_example_with_highlighting` return an `impl fmt::Display`)
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit c6d0059 into rust-lang:masterSep 25, 2025
11 checks passed
rust-timer added a commit that referenced this pull request Sep 25, 2025
Rollup merge of #146933 - yotamofek:pr/rustdoc/highlight_no_write_str, r=GuillaumeGomez
Make `render_example_with_highlighting` return an `impl fmt::Display`
Removes some more usages of `write_str`. Shouldn't affect runtime, but makes the codebase a bit more consistent.
Each commit can be reviewed separately
@rustbotrustbot added this to the 1.92.0 milestone Sep 25, 2025
github-actionsBot pushed a commit to rust-lang/miri that referenced this pull request Sep 26, 2025
Rollup of 8 pull requests
Successful merges:
- rust-lang/rust#116882 (rustdoc: hide `#[repr]` if it isn't part of the public ABI)
- rust-lang/rust#135771 ([rustdoc] Add support for associated items in "jump to def" feature)
- rust-lang/rust#141032 (avoid violating `slice::from_raw_parts` safety contract in `Vec::extract_if`)
- rust-lang/rust#142401 (Add proper name mangling for pattern types)
- rust-lang/rust#146293 (feat: non-panicking `Vec::try_remove`)
- rust-lang/rust#146859 (BTreeMap: Don't leak allocators when initializing nodes)
- rust-lang/rust#146924 (Add doc for `NonZero*` const creation)
- rust-lang/rust#146933 (Make `render_example_with_highlighting` return an `impl fmt::Display`)
r? `@ghost`
`@rustbot` modify labels: rollup
Zalathar added a commit to Zalathar/rust that referenced this pull request Sep 28, 2025
…ating_write_str, r=GuillaumeGomez
[rustdoc] Finish getting rid of usages `write_str`
This PR, along with rust-lang#146933 , get rid of all the last usages of the `write_str` fn that was introduced back in rust-lang#136784 .
This *shouldn't* be rolled up along with rust-lang#146933 , since the later of the two to be merged will need to delete the no-longer-used `write_str` fn.
Commits can be reviewed separately.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Sep 28, 2025
…ating_write_str, r=GuillaumeGomez
[rustdoc] Finish getting rid of usages `write_str`
This PR, along with rust-lang#146933 , get rid of all the last usages of the `write_str` fn that was introduced back in rust-lang#136784 .
This *shouldn't* be rolled up along with rust-lang#146933 , since the later of the two to be merged will need to delete the no-longer-used `write_str` fn.
Commits can be reviewed separately.
rust-timer added a commit that referenced this pull request Sep 28, 2025
Rollup merge of #146942 - yotamofek:pr/rustdoc/finish_deprecating_write_str, r=GuillaumeGomez
[rustdoc] Finish getting rid of usages `write_str`
This PR, along with #146933 , get rid of all the last usages of the `write_str` fn that was introduced back in #136784 .
This *shouldn't* be rolled up along with #146933 , since the later of the two to be merged will need to delete the no-longer-used `write_str` fn.
Commits can be reviewed separately.
@yotamofek
yotamofek deleted the pr/rustdoc/highlight_no_write_str branch September 28, 2025 13:33
github-actionsBot pushed a commit to model-checking/verify-rust-std that referenced this pull request Oct 9, 2025
…iaskrgr
Rollup of 8 pull requests
Successful merges:
- rust-lang#116882 (rustdoc: hide `#[repr]` if it isn't part of the public ABI)
- rust-lang#135771 ([rustdoc] Add support for associated items in "jump to def" feature)
- rust-lang#141032 (avoid violating `slice::from_raw_parts` safety contract in `Vec::extract_if`)
- rust-lang#142401 (Add proper name mangling for pattern types)
- rust-lang#146293 (feat: non-panicking `Vec::try_remove`)
- rust-lang#146859 (BTreeMap: Don't leak allocators when initializing nodes)
- rust-lang#146924 (Add doc for `NonZero*` const creation)
- rust-lang#146933 (Make `render_example_with_highlighting` return an `impl fmt::Display`)
r? `@ghost`
`@rustbot` modify labels: rollup
Kobzol pushed a commit to Kobzol/rustc_codegen_gcc that referenced this pull request Dec 21, 2025
Rollup of 8 pull requests
Successful merges:
- rust-lang/rust#116882 (rustdoc: hide `#[repr]` if it isn't part of the public ABI)
- rust-lang/rust#135771 ([rustdoc] Add support for associated items in "jump to def" feature)
- rust-lang/rust#141032 (avoid violating `slice::from_raw_parts` safety contract in `Vec::extract_if`)
- rust-lang/rust#142401 (Add proper name mangling for pattern types)
- rust-lang/rust#146293 (feat: non-panicking `Vec::try_remove`)
- rust-lang/rust#146859 (BTreeMap: Don't leak allocators when initializing nodes)
- rust-lang/rust#146924 (Add doc for `NonZero*` const creation)
- rust-lang/rust#146933 (Make `render_example_with_highlighting` return an `impl fmt::Display`)
r? `@ghost`
`@rustbot` modify labels: rollup
Kobzol pushed a commit to Kobzol/rustc_codegen_cranelift that referenced this pull request Dec 29, 2025
Rollup of 8 pull requests
Successful merges:
- rust-lang/rust#116882 (rustdoc: hide `#[repr]` if it isn't part of the public ABI)
- rust-lang/rust#135771 ([rustdoc] Add support for associated items in "jump to def" feature)
- rust-lang/rust#141032 (avoid violating `slice::from_raw_parts` safety contract in `Vec::extract_if`)
- rust-lang/rust#142401 (Add proper name mangling for pattern types)
- rust-lang/rust#146293 (feat: non-panicking `Vec::try_remove`)
- rust-lang/rust#146859 (BTreeMap: Don't leak allocators when initializing nodes)
- rust-lang/rust#146924 (Add doc for `NonZero*` const creation)
- rust-lang/rust#146933 (Make `render_example_with_highlighting` return an `impl fmt::Display`)
r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.T-rustdoc-frontendRelevant 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.

6 participants

@yotamofek@rustbot@GuillaumeGomez@rust-timer@bors@notriddle