summary refs log tree commit diff
path: root/src/librustdoc/html/render
AgeCommit message (Collapse)AuthorLines
2021-09-04Remove implementors settingGuillaume Gomez-1/+0
2021-09-04Clean render_impl argumentsGuillaume Gomez-46/+67
2021-09-04Put back "auto-collapse-implementors" settingGuillaume Gomez-0/+1
2021-09-04Put back display of associated items (types and consts)Guillaume Gomez-11/+33
2021-07-27Rustdoc 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-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-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.
2021-06-20Use Tera templates for rustdoc.Jacob Hoffman-Andrews-1/+22
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.
2021-06-20"(const: unstable)" for stable-but-const-unstableDeadbeef-9/+31
2021-06-19rustdoc: Introduce new `DynTrait` type for better representation of trait ↵Justus K-0/+1
objects
2021-06-19Rollup merge of #86370 - ↵Yuki Okushi-2/+3
matteo-briani:fix-rustdoc-stabilized-versions-layout, r=GuillaumeGomez Fix rustdoc stabilized versions layout Fixes #86342 r? `@GuillaumeGomez`
2021-06-18Resolve intra-doc links in summary descMichael Howell-4/+9
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-18Auto merge of #86322 - trinity-1686a:rustdoc-fix-overflow-recursive-deref, ↵bors-13/+0
r=jyn514 fix rustdoc stack overflow on mutually recursive Deref fix #85095 fix #85037
2021-06-17rustdoc: add optional woff2 versions of Source Serif and Source CodeTrevor Spiteri-0/+6
2021-06-17Fix rustdoc stabilized versions layoutMatteo Briani-2/+3
2021-06-16Restore details for Impls on Foreign TypesJacob Hoffman-Andrews-4/+10
These were previously removed along with the details in the "Implementors" section of trait pages. But for "Implementations on Foreign Types," we need to include the details because they will not be documented anywhere else.
2021-06-16Fix target highlighting in rustdoc.Jacob Hoffman-Andrews-36/+21
Also factor out outer_version and const_outer_version into render_rightside.
2021-06-16Move anchor earlier in the DOM for easier layoutJacob Hoffman-Andrews-8/+11
2021-06-16Factor out render_rightsideJacob Hoffman-Andrews-43/+30
This covers rendering of stability_since and the srclink across methods and trait implementations, so their DOM representation is consistent.
2021-06-16Make portability part of the summary.Jacob Hoffman-Andrews-9/+21
That means it will be visible under "Implementors" on trait pages, and under "Implementations" on struct/enum pages, even when all methods are collapsed. Switch to a float layout for rightside elements.