about summary refs log tree commit diff
path: root/src/librustdoc/html/render
AgeCommit message (Collapse)AuthorLines
2021-08-05Improve code readabilityGuillaume Gomez-2/+4
2021-08-05* Rename 'move_span' into 'local_span_to_global_span'Guillaume Gomez-0/+17
* Add documentation on new arguments/functions
2021-08-05Generate links for modules as wellGuillaume Gomez-5/+24
2021-08-05Generate links for methods as wellGuillaume Gomez-16/+36
2021-08-05Add an option for the source code link generationGuillaume Gomez-3/+12
2021-08-05Add links on source types to go to definitionGuillaume Gomez-26/+159
2021-08-04Rollup merge of #87720 - matthiaskrgr:clippy_into, r=jyn514Yuki Okushi-1/+1
don't use .into() to convert types to identical types (clippy::useless_conversion) Example: let _x: String = String::from("hello world").into();
2021-08-03Simplify usage of CSS background-imageGuillaume Gomez-6/+41
2021-08-03Rustdoc accessibility: use an icon for the [-]/[+] controlsMichael Howell-2/+5
This way, we can show the plus and minus buttons on screens, while voice control will read off actual words "Collapse" and "Expand" instead of reading "open brace minus close brace" and "open brace plus close brace". Part of #87059
2021-08-03don't use .into() to convert types to identical types ↵Matthias Krüger-1/+1
(clippy::useless_conversion) Example: let _x: String = String::from("hello world").into();
2021-07-29Rollup merge of #87451 - GuillaumeGomez:tuple-struct-field-doc, r=jyn514Yuki Okushi-12/+19
Add support for tuple struct field documentation Fixes #42615. This is #80320 updated to new codebase and with added tests. Part of https://github.com/rust-lang/rust/issues/83255. cc ```@camelid``` (since you were involved on the original PR). r? ```@jyn514```
2021-07-26Rollup merge of #87464 - camelid:rm-union-structhead, r=jyn514Guillaume Gomez-4/+2
Remove unnecessary `structhead` parameter from `render_union` `structhead` is used for `render_struct` so that the logic for rendering structs can be shared between struct variants and struct items. However, `render_union` is not used anywhere except for rendering union items, so its `structhead` parameter is unnecessary.
2021-07-26Add support for tuple struct fields documentation in enums as wellGuillaume Gomez-3/+7
2021-07-25Remove unnecessary `structhead` parameter from `render_union`Noah Lev-4/+2
`structhead` is used for `render_struct` so that the logic for rendering structs can be shared between struct variants and struct items. However, `render_union` is not used anywhere except for rendering union items, so its `structhead` parameter is unnecessary.
2021-07-25Auto merge of #87390 - notriddle:notriddle/rustdoc-headers-patch, ↵bors-13/+13
r=GuillaumeGomez Rustdoc accessibility: use real headers for doc items Part of #87059 Partially reverts #84703 Preview at: https://notriddle.com/notriddle-rustdoc-test/real-headers/std/index.html
2021-07-25Rustdoc accessibility: use real headers for doc itemsbors-13/+13
Part of #87059 Partially reverts #84703 Preview at: https://notriddle.com/notriddle-rustdoc-test/real-headers/std/index.html
2021-07-25Add support for tuple structs' fields documentationGuillaume Gomez-9/+12
2021-07-22Don't hide fields of enum struct variantsNoah Lev-4/+1
* The toggle adds visual clutter * It's easy to miss that there are fields * Tuple variant fields are always shown, so it is inconsistent to hide struct variant fields * It's annoying to have to click the toggle every time
2021-07-21Rollup merge of #87024 - weihanglo:issue-85494, r=ManishearthEric Huss-12/+34
rustdoc: show count of item contents when hidden Resolves #85494
2021-07-17Rustdoc accessibility: make the sidebar headers actual headersMichael Howell-29/+29
Part of #87059 Preview it at: https://notriddle.com/notriddle-rustdoc-test/rustdoc-sidebar-header/std/index.html
2021-07-16Auto merge of #86662 - mockersf:fix-86620-link-unknown-location, r=jyn514bors-8/+11
fix dead link for method in trait of blanket impl from third party crate fix #86620 * changes `href` method to raise the actual error it had instead of an `Option` * set the href link correctly in case of an error I did not manage to make a small reproducer, I think it happens in a situation where * crate A expose a trait with a blanket impl * crate B use the trait from crate A * crate C use types from crate B * building docs for crate C without dependencies r? `@jyn514`
2021-07-16Copy item path rather than full `use` statement.moxian-3/+2
2021-07-12Auto merge of #86841 - GuillaumeGomez:reexported-macro-2-render, r=Stupremeebors-2/+11
Fix rendering of reexported macros 2.0 and fix visibility of reexported items So, this PR grew a bit out of focus, it does the following things: * Fixes #86276. * Fixes visibility display for reexported items: it now takes the visibility of the "use" statement rather than the visibility of the reexported item itself). * Fixes the display of reexported items if "--document-private-items" option is used. Before, they were simply skipped. * Fixes inconsistency on typedef items: they didn't display their visibility contrary to other items. I added tests to check everything listed above. cc `@camelid` `@ollie27` (in case one of you want to review?) r? `@jyn514`
2021-07-11rustdoc: show count of item contents when hiddenWeihang Lo-12/+34
2021-07-11comment about link without a hrefFrançois Mockers-0/+1
2021-07-08Fix display of small-section-header elementsGuillaume Gomez-1/+1
2021-07-07Fix inconsistency on visibility display for typedefsGuillaume Gomez-2/+11
2021-07-06only remove link for TyMethodFrançois Mockers-4/+4
2021-07-06review - better error names/docFrançois Mockers-1/+1
2021-07-06fix dead link for method in trait of blanket impl from third party crateFrançois Mockers-8/+10
2021-07-05Revert "rustdoc: Store DefId's in ItemId on heap for decreasing Item's size"Justus K-33/+24
This reverts commit 41a345d4c46dad1a98c9993bc78513415994e8ba.
2021-07-05rustdoc: Store DefId's in ItemId on heap for decreasing Item's sizeJustus K-24/+33
2021-07-05rustdoc: Rename `expect_real` to `expect_def_id`, remove `Item::is_fake`Justus K-18/+18
2021-07-05rustdoc: Replace `FakeDefId` with new `ItemId` typeJustus K-2/+2
2021-07-01fix(rustdoc): generics searchMichael Howell-1/+26
This commit adds a test case for generics, re-adds generics data to the search index, and tweaks function indexing to use less space in JSON. This reverts commit 14ca89446c076bcf484d3d05bd991a4b7985a409.
2021-06-28Move stab_tags to symbol in tablesStefan Schindler-3/+4
2021-06-26Auto merge of #84814 - Stupremee:properly-render-hrtbs, r=GuillaumeGomezbors-0/+1
Properly render HRTBs ```rust pub fn test<T>() where for<'a> &'a T: Iterator, {} ``` This will now render properly including the `for<'a>` ![image](https://user-images.githubusercontent.com/39732259/116808426-fe6ce600-ab38-11eb-9452-f33f554fbb8e.png) I do not know if this covers all cases, it only covers everything that I could think of that includes `for` and lifetimes in where bounds. Also someone need to mentor me on how to add a proper rustdoc test for this. Resolves #78482
2021-06-26Rollup merge of #86608 - notriddle:notriddle/cleanup-rustdoc, r=jyn514Yuki Okushi-49/+5
chore(rustdoc): remove unused members of RenderType PR #86561 removes the only place the `generics` member is read. This PR does even more cleanup.
2021-06-24chore(rustdoc): remove unused members of RenderTypeMichael Howell-49/+5
Commit e629381653bb3579f0cea0b256e391edef5e8dbb removes the only place these members variables are actually read.
2021-06-24Migrate from custom elements to divs with classes to be compatible with safariStefan Schindler-13/+18
2021-06-24Hide Crate Version on narrow ScreensStefan Schindler-3/+4
2021-06-24Implement Desktop and Mobile version with gridlayoutStefan Schindler-15/+14
* implement sans-serif #85621
2021-06-24Rollup merge of #86561 - notriddle:notriddle/cleanup-rustdoc, r=jyn514Yuki Okushi-22/+0
chore(rustdoc): Remove unused impl block
2021-06-22Revert "List trait impls before methods from deref in the sidebar of ↵Jacob Hoffman-Andrews-8/+8
Rustdoc's output" This reverts commit 8a058926ecd6d0988714f8f7a5a31293c533f8c6.
2021-06-22chore(rustdoc): Remove unused impl blockMichael Howell-22/+0
2021-06-22Rollup merge of #86451 - notriddle:notriddle/rustdoc-intra-doc-link-summary, ↵Yuki Okushi-4/+9
r=CraftSpider Resolve intra-doc links in summary desc Before: ![rustdoc-intra-doc-link-summary-before](https://user-images.githubusercontent.com/1593513/122623069-9d995e80-d04f-11eb-8d46-ec2ec126bb5e.png) After: ![rustdoc-intra-doc-link-summary](https://user-images.githubusercontent.com/1593513/122623076-a4c06c80-d04f-11eb-967a-f5916871c34b.png)
2021-06-22Rollup merge of #86402 - tspiteri:source-woff2, r=jshaYuki Okushi-0/+6
rustdoc: add optional woff2 versions of Source Serif and Source Code This provides woff2 versions of Source Serif and Source Code similar to how #82545 provides woff2 versions of Fira Sans. The total byte count for the six files (three for each font family) is reduced by 25% from 476 KiB to 358 KiB.
2021-06-22Rollup merge of #86473 - fee1-dead:rustdoc-const-unstable, r=jyn514Yuki Okushi-38/+73
Rustdoc: Account for const-unstable functions Fixes #86464
2021-06-21Check for const_unstable before printing `const`Deadbeef-31/+44
2021-06-21Auto merge of #86157 - jsha:tera, r=jyn514,GuillaumeGomezbors-1/+22
Use Tera templates for rustdoc. Replaces a format!() call in layout::render with a template expansion. Introduces a `templates` field in SharedContext so parts of rustdoc can share pre-rendered templates. This currently builds in a copy of the single template available, like with static files. However, future work can make this live-loadable with a perma-unstable flag, to make rustdoc developers' work easier. Part of #84419. Demo at https://hoffman-andrews.com/rust/tera/std/string/struct.String.html.