rust/src/librustdoc
bors d610b0c514 Auto merge of #109011 - jsha:reduce-allocations-inner-full-print, r=notriddle
rustdoc: reduce allocs in FnDecl::inner_full_print

Instead of maintaining parallel buffers for both HTML and non-HTML output, follow the idiom from the rest of format.rs that f.alternate() == true means textual output. Also, add an argument to control line wrapping explicitly.

This allows the caller to render once with textual output and no line wrapping, to decide whether line wrapping should be applied in the final HTML output.

Also, remove some format! and " ".repeat calls, and remove a dependency on calling `String::replace` to switch from newlines to spaces.

This coincidentally fixes some minor bugs where the old code was undercounting the number of characters for a declaration in text mode.
2023-03-13 02:17:49 +00:00
..
clean Fix invalid inlining of reexport of reexport of private item 2023-03-07 21:20:21 +01:00
doctest Rename TestOptions to GlobalTestOptions 2021-12-12 17:46:19 -08:00
formats Rollup merge of #107629 - pitaj:rustdoc-search-deprecated, r=jsha 2023-03-11 12:55:41 +01:00
html Auto merge of #109011 - jsha:reduce-allocations-inner-full-print, r=notriddle 2023-03-13 02:17:49 +00:00
json rustdoc: reduce allocations when generating tooltips 2023-02-22 21:00:10 -07:00
passes rustc_middle: Remove trait DefIdTree 2023-03-02 23:46:44 +04:00
theme Correctly handle parens 2022-09-15 13:53:20 +02:00
askama.toml Remove unneeded minus sign in jinja tags 2023-03-06 11:38:15 +01:00
Cargo.toml Update askama version to 0.12 2023-03-06 11:17:11 +01:00
config.rs Fix typo in comment 2023-01-21 17:34:30 -05:00
core.rs various: translation resources from cg backend 2023-02-22 09:15:54 +00:00
docfs.rs Remove crate visibility modifier in libs, tests 2022-05-21 00:32:47 -04:00
doctest.rs Exit when there are unmatched delims to avoid noisy diagnostics 2023-02-28 07:55:19 +00:00
error.rs Remove crate visibility modifier in libs, tests 2022-05-21 00:32:47 -04:00
externalfiles.rs Remove crate visibility modifier in libs, tests 2022-05-21 00:32:47 -04:00
fold.rs clean: Always store enum disriminant. 2023-01-01 18:11:53 +00:00
lib.rs Use ThinVec in various AST types. 2023-02-21 11:51:56 +11:00
lint.rs Only include stable lints in rustdoc::all group 2023-02-19 22:05:58 -08:00
markdown.rs Turn MarkdownWithToc into a struct with named fields 2023-02-06 16:31:17 +01:00
README.md rust-lang.github.io/rustc-dev-guide -> rustc-dev-guide.rust-lang.org 2020-03-10 17:08:18 -03:00
scrape_examples.rs remove bound_type_of query; make type_of return EarlyBinder; change type_of in metadata 2023-02-16 17:05:56 -07:00
theme.rs Correctly handle parens 2022-09-15 13:53:20 +02:00
visit.rs clean: Always store enum disriminant. 2023-01-01 18:11:53 +00:00
visit_ast.rs Rollup merge of #108936 - GuillaumeGomez:rustdoc-anonymous-reexport, r=notriddle 2023-03-10 12:31:58 +01:00
visit_lib.rs rustdoc: Eliminate remaining uses of resolver 2023-02-13 00:10:15 +04:00

For more information about how librustdoc works, see the rustc dev guide.