about summary refs log tree commit diff
path: root/src/librustdoc
AgeCommit message (Collapse)AuthorLines
2025-10-03Auto merge of #145898 - lolbinarycat:rustdoc-search-trait-parent, ↵bors-60/+194
r=GuillaumeGomez,notriddle If a trait item appears in rustdoc search, hide the corrosponding impl items fixes rust-lang/rust#138251 cc `@notriddle`
2025-10-02search.js: introduce optimized removeIdxListAsc routinebinarycat-9/+30
2025-10-02if a trait item is shown in search results, hide the impl itembinarycat-61/+174
for example, if we're showing `Iterator::next`, we don't need to also show `Range::next` in the results. Co-authored-by: Michael Howell <michael@notriddle.com>
2025-10-02Move doc_cfg-specific code into `cfg.rs`Guillaume Gomez-264/+268
2025-09-30Replace `rustc_span::Span` with a stripped down version for librustdoc's ↵Yotam Ofek-18/+65
highlighter
2025-09-30Add `#[bench]` for librustdoc's syntax highlighterYotam Ofek-0/+14
2025-09-29Rollup merge of #147153 - ↵Jacob Pratt-2/+2
GuillaumeGomez:doc-propagation-before-stripping-items, r=lolbinarycat [rustdoc] Move doc cfg propagation pass before items stripping passes Follow-up of https://github.com/rust-lang/rust/pull/138907. r? lolbinarycat
2025-09-29Rollup merge of #147133 - GuillaumeGomez:rm-loop-extract_cfg_from_attrs, ↵Matthias Krüger-11/+5
r=lolbinarycat Remove one loop in `extract_cfg_from_attrs` Follow-up of https://github.com/rust-lang/rust/pull/138907. r? lolbinarycat
2025-09-29Move doc cfg propagation pass before items stripping passesGuillaume Gomez-2/+2
2025-09-29Improve code commentsGuillaume Gomez-5/+3
2025-09-29Use `Iterator::eq` and (dogfood) `eq_by` in compiler and libraryYotam Ofek-1/+2
2025-09-28Remove one loop in `extract_cfg_from_attrs`Guillaume Gomez-8/+4
2025-09-28Auto merge of #147002 - notriddle:stringdex3, r=GuillaumeGomezbors-28/+52
rustdoc-search: stringdex update with more packing Before: 18M build/x86_64-unknown-linux-gnu/doc/search.index/ 57M build/x86_64-unknown-linux-gnu/compiler-doc/search.index/ After: 16M build/x86_64-unknown-linux-gnu/doc/search.index/ 49M build/x86_64-unknown-linux-gnu/compiler-doc/search.index/ CC rust-lang/rust#146063
2025-09-28Auto merge of #147118 - matthiaskrgr:rollup-4yqmoyr, r=matthiaskrgrbors-117/+90
Rollup of 14 pull requests Successful merges: - rust-lang/rust#142139 (Include additional hashes in src/stage0) - rust-lang/rust#146745 (Clarified error note for usize range matching) - rust-lang/rust#146763 (cg_llvm: Replace some DIBuilder wrappers with LLVM-C API bindings (part 5)) - rust-lang/rust#146788 (chore: removes deprecated discord.) - rust-lang/rust#146942 ([rustdoc] Finish getting rid of usages `write_str`) - rust-lang/rust#147061 (fix rebasing cycle heads when not reaching a fixpoint) - rust-lang/rust#147066 (Fix tracking issue number for feature(macro_attr)) - rust-lang/rust#147081 (doc: fix a typo in platform-support.md) - rust-lang/rust#147082 (formatting_options: fix alternate docs 0b/0o mixup) - rust-lang/rust#147086 (compiletest: Use `PanicHookInfo::payload_as_str` now that it's stable in beta) - rust-lang/rust#147093 (redox: switch to colon as path separator) - rust-lang/rust#147095 (Library: Remove remaining private `#[repr]` workarounds) - rust-lang/rust#147098 (Add auto extra-checks in pre-push hook) - rust-lang/rust#147110 (Fix typo) r? `@ghost` `@rustbot` modify labels: rollup
2025-09-28Rollup merge of #146942 - yotamofek:pr/rustdoc/finish_deprecating_write_str, ↵Matthias Krüger-117/+90
r=GuillaumeGomez [rustdoc] Finish getting rid of usages `write_str` This PR, along with rust-lang/rust#146933 , get rid of all the last usages of the `write_str` fn that was introduced back in rust-lang/rust#136784 . This *shouldn't* be rolled up along with rust-lang/rust#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.
2025-09-28Auto merge of #147045 - notriddle:search-index-entrydata-path, r=GuillaumeGomezbors-8/+32
rustdoc-search: use the same ID for entry and path to same item This decreases the size of the compiler-doc from 57MiB to 56MiB. r? `@GuillaumeGomez`
2025-09-27Rollup merge of #147032 - ↵Matthias Krüger-3/+7
GuillaumeGomez:fix-doctest-compilation-time-display, r=lolbinarycat Fix doctest compilation time display Fixes rust-lang/rust#146960. Small corner case that happened in case everything went fine and there was only merged doctests. r? lolbinarycat
2025-09-27Improve code and fix typoGuillaume Gomez-8/+5
2025-09-27Apply first review round suggestionsGuillaume Gomez-14/+2
2025-09-27Improve code comments and extend tests for `doc_cfg` featureGuillaume Gomez-2/+4
2025-09-27Correctly handle target_feature in rustdoc cfgGuillaume Gomez-26/+11
2025-09-27fmtGuillaume Gomez-5/+3
2025-09-27Improve code and better check `doc(cfg(...))` attributesGuillaume Gomez-36/+57
2025-09-27Add code documentation, improve code and improve error messageGuillaume Gomez-5/+22
2025-09-27Put back the `doc_cfg` code behind a nightly featureGuillaume Gomez-1/+5
2025-09-27Rename `CfgInfo::doc_auto_cfg_active` into `auto_cfg_active`Guillaume Gomez-9/+9
2025-09-27Remove useless code in `propagate_doc_cfg.rs`Guillaume Gomez-18/+1
2025-09-27Implement RFC 3631Guillaume Gomez-161/+370
2025-09-27Auto merge of #146636 - Mark-Simulacrum:bootstrap-bump, r=jieyouxubors-1/+0
Bump bootstrap compiler to 1.91 beta https://forge.rust-lang.org/release/process.html#default-branch-bootstrap-update-tuesday
2025-09-26Apply cfg(bootstrap) replacementMark Rousskov-1/+0
2025-09-26Rollup merge of #147027 - GuillaumeGomez:tyalias-disambiguator, r=lolbinarycatMatthias Krüger-0/+2
Add new `tyalias` intra-doc link disambiguator Fixes https://github.com/rust-lang/rust/issues/146855. Alternative to rust-lang/rust#146866. This adds support for a new disambiguator: `tyalias`. I think it's common enough to have type aliases nowaday, so no reason to not be able to have a disambiguator for them. cc ``@fmease`` r? lolbinarycat
2025-09-26Add new `tyalias` intra-doc link disambiguatorGuillaume Gomez-0/+2
2025-09-26Simplify notable traits map serializationYotam Ofek-20/+5
2025-09-26Cleanup `notable_traits_decl`Yotam Ofek-56/+63
2025-09-26Remove usages of `write_str` from `render_assoc_items_inner`Yotam Ofek-41/+22
2025-09-26Rollup merge of #147047 - notriddle:toolbar-index, r=GuillaumeGomezMatthias Krüger-3/+13
rustdoc: put the toolbar on the all item index
2025-09-25rustdoc-search: add descriptive comment to space-saving hackMichael Howell-0/+8
2025-09-25rustdoc: put the toolbar on the all item indexMichael Howell-3/+13
2025-09-25rustdoc-search: use the same ID for entry and path to same itemMichael Howell-8/+24
This decreases the size of the compiler-doc from 57MiB to 56MiB.
2025-09-25Auto merge of #147037 - matthiaskrgr:rollup-xtgqzuu, r=matthiaskrgrbors-341/+378
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
2025-09-25Rollup merge of #146933 - yotamofek:pr/rustdoc/highlight_no_write_str, ↵Matthias Krüger-95/+80
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
2025-09-25Rollup merge of #135771 - GuillaumeGomez:jump-to-def-perf, r=fmeaseMatthias Krüger-92/+152
[rustdoc] Add support for associated items in "jump to def" feature Fixes https://github.com/rust-lang/rust/issues/135485. r? ``@fmease``
2025-09-25Rollup merge of #116882 - fmease:rustdoc-generalized-priv-repr-heuristic, ↵Matthias Krüger-154/+146
r=rustdoc rustdoc: hide `#[repr]` if it isn't part of the public ABI > [!IMPORTANT] > Temporarily stacked on top of PR https://github.com/rust-lang/rust/pull/146527; only the last commit is relevant! Follow-up to rust-lang/rust#115439. Unblocks rust-lang/rust#116743, CC ``@dtolnay.`` Fixes rust-lang/rust#66401. Fixes rust-lang/rust#128364. Fixes rust-lang/rust#137440. Only display the representation `#[repr(REPR)]` (where `REPR` is not `Rust` or `transparent`) of a given type if none of its variants (incl. the synthetic variants of structs) are `#[doc(hidden)]` and all of its fields are public and not `#[doc(hidden)]` since it's likely not meant to be considered part of the public ABI otherwise. `--document-{private,hidden}-items` works as expected in this context, too. Moreover, we now also factor in the presence of `#[doc(hidden)]` when checking whether to show `repr(transparent)` or not.
2025-09-25Correctly display merged doctest compilation timeGuillaume Gomez-3/+7
2025-09-25Rollup merge of #146667 - calebzulawski:simd-mono-lane-limit, r=lcnr,RalfJungStuart Cook-0/+5
Add an attribute to check the number of lanes in a SIMD vector after monomorphization Allows std::simd to drop the `LaneCount<N>: SupportedLaneCount` trait and maintain good error messages. Also, extends rust-lang/rust#145967 by including spans in layout errors for all ADTs. r? ``@RalfJung`` cc ``@workingjubilee`` ``@programmerjake``
2025-09-25rustdoc: hide `#[repr(...)]` if it isn't part of the public ABILeón Orell Valerian Liehr-21/+61
2025-09-25rustdoc: Fully escape link section and export nameLeón Orell Valerian Liehr-2/+2
Escape "special characters" (e.g., double quotes `"` and line breaks `\n`). Escape HTML. Lastly, add regression tests and clean up existing tests.
2025-09-25rustdoc: Slightly clean up attr renderingLeón Orell Valerian Liehr-97/+56
2025-09-24Rollup merge of #146897 - lolbinarycat:rustdoc-invalid_html_tags-ice-146890, ↵Matthias Krüger-1/+2
r=GuillaumeGomez fix ICE in rustdoc::invalid_html_tags fixes https://github.com/rust-lang/rust/issues/146890 r? ```@GuillaumeGomez```
2025-09-24rustdoc-search: stringdex update with more packingMichael Howell-28/+52
Before: 18M build/x86_64-unknown-linux-gnu/doc/search.index/ 57M build/x86_64-unknown-linux-gnu/compiler-doc/search.index/ After: 16M build/x86_64-unknown-linux-gnu/doc/search.index/ 49M build/x86_64-unknown-linux-gnu/compiler-doc/search.index/