summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser/expr.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-03-02 12:35:48 +0000
committerbors <bors@rust-lang.org>2025-03-02 12:35:48 +0000
commit7c4a55c2ac6497629c273ccd00e185583542f0d2 (patch)
tree4659ef3294fd921534f54b3743742856e3b91060 /compiler/rustc_parse/src/parser/expr.rs
parent4b696e6bf77b4df02634d346637bd35f2960c5f4 (diff)
parent479116e6910e3b3329adcdebfdca2707f10e5880 (diff)
downloadrust-7c4a55c2ac6497629c273ccd00e185583542f0d2.tar.gz
rust-7c4a55c2ac6497629c273ccd00e185583542f0d2.zip
Auto merge of #137425 - yotamofek:pr/rustdoc/return-impl-display-redux, r=GuillaumeGomez
`librustdoc`: return `impl fmt::Display` in more places instead of writing to strings

Continuation of #136784 , another attempt at landing the larger parts of #136748 .
I'd like to, gradually, make all of the building blocks for rendering docs in `librustdoc` return `impl fmt::Display` instead of returning `Strings`, or receiving a `&mut String` (or `&mut impl fmt::Write`). Another smaller end goal is to be able to get rid of [`write_str`](https://github.com/rust-lang/rust/blob/8dac72bb1d12b2649acd0c190e41524f83da5683/src/librustdoc/html/format.rs#L40-L42).
This PR is a large step in that direction.

Most of the changes are quite mechanical, and split up into separate commits for easier reviewing (hopefully). I took `print_item` and then started by converting all the functions it called (and their dependencies), and the last commit does the conversion for `print_item` itself. Ignoring whitespace should make reviewing a bit easier.

And most importantly, perf run shows pretty good results locally, hopefully CI will also show green 😁

r? `@GuillaumeGomez` , if you feel like it.
Diffstat (limited to 'compiler/rustc_parse/src/parser/expr.rs')
0 files changed, 0 insertions, 0 deletions