summary refs log tree commit diff
path: root/src/librustdoc/html/render/mod.rs
AgeCommit message (Collapse)AuthorLines
2021-09-04Remove implementors settingGuillaume Gomez-1/+0
2021-09-04Clean render_impl argumentsGuillaume Gomez-36/+52
2021-09-04Put back "auto-collapse-implementors" settingGuillaume Gomez-0/+1
2021-09-04Put back display of associated items (types and consts)Guillaume Gomez-7/+24
2021-07-27Rustdoc accessibility: use real headers for doc itemsbors-11/+11
Part of #87059 Partially reverts #84703 Preview at: https://notriddle.com/notriddle-rustdoc-test/real-headers/std/index.html
2021-07-17Rustdoc accessibility: make the sidebar headers actual headersMichael Howell-27/+27
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-11comment about link without a hrefFrançois Mockers-0/+1
2021-07-08Fix display of small-section-header elementsGuillaume Gomez-1/+1
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-14/+7
This reverts commit 41a345d4c46dad1a98c9993bc78513415994e8ba.
2021-07-05rustdoc: Store DefId's in ItemId on heap for decreasing Item's sizeJustus K-7/+14
2021-07-05rustdoc: Rename `expect_real` to `expect_def_id`, remove `Item::is_fake`Justus K-4/+4
2021-07-05rustdoc: Replace `FakeDefId` with new `ItemId` typeJustus K-2/+2
2021-07-01fix(rustdoc): generics searchMichael Howell-1/+8
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-26Rollup merge of #86608 - notriddle:notriddle/cleanup-rustdoc, r=jyn514Yuki Okushi-24/+0
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-24/+0
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-1/+1
2021-06-24Hide Crate Version on narrow ScreensStefan Schindler-0/+1
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-21Check for const_unstable before printing `const`Deadbeef-13/+17
2021-06-20"(const: unstable)" for stable-but-const-unstableDeadbeef-7/+29
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-16Fix target highlighting in rustdoc.Jacob Hoffman-Andrews-28/+19
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-5/+12
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.
2021-06-16Use render_impl_summary when rendering traits.Jacob Hoffman-Andrews-24/+17
2021-06-16Remove methods under Implementors on trait pagesJacob Hoffman-Andrews-17/+21
These were hidden by default, and duplicated information already on the page anyhow. Also remove the "Auto-hide trait implementors of a trait" setting, which is not needed anymore.
2021-06-16Open trait implementations' toggles by default.Jacob Hoffman-Andrews-7/+2
This makes it possible to use Ctrl-F to find methods defined in traits.
2021-06-15remove code for recursive Deref in sidebarTrinity Pointard-29/+2
fix #85037
2021-06-15fix rustdoc stack overflow on mutually recursive DerefTrinity Pointard-3/+17
fix #85095
2021-06-15Rollup merge of #86277 - jsha:remove-must-use, r=ManishearthYuki Okushi-8/+2
Remove must_use from ALLOWED_ATTRIBUTES This is a fairly common attribute on methods, but is not something you need to know when reading the method docs - the purpose of the attribute is for the compiler to tell you about it if you forget to use a value. Removing reclaims some valuable space in the summary of methods, particularly when the attribute has a long string value. As discussed in #84309. Partially addresses #81482. r? ```@Manishearth```
2021-06-15Auto merge of #84867 - pnkfelix:rustdoc-revert-deref-recur, r=jyn514bors-20/+6
rustdoc: revert deref recur to resume inclusion of impl ExtTrait<Local> for ExtType As discussed here: https://github.com/rust-lang/rust/issues/82465#issuecomment-829290384, Revert PR #80653 to resolve issue #82465. Issue #82465 was we had stopped including certain trait implementations, namely implementations on an imported type of an imported trait *instantiated on a local type*. That bug was injected by PR #80653. Reverting #80653 means we don't list all the methods that you have accessible via recursively applying `Deref`. [Discussion in last week's rustc triage meeting](https://zulip-archive.rust-lang.org/238009tcompilermeetings/19557weekly2021042954818.html#236680594) led us to conclude that the bug was worse than the enhancement, and there was not an obvious fix for the bug itself. So for the short term we remove the enhancement, while in the long term we will work on figuring out a way to have our imported trait implementation cake and eat it too.
2021-06-13Remove must_use from ALLOWED_ATTRIBUTESJacob Hoffman-Andrews-8/+2
This is a fairly common attribute on methods, but is not something you need to know when reading the method docs - the purpose of the attribute is for the compiler to tell you about it if you forget to use a value. Removing reclaims some valuable space in the summary of methods.
2021-06-10manually crafted revert of PR #80653, to address issue #82465.Felix S. Klock II-20/+6
(update: placated tidy) (update: rebased post PR #84707 ) merge me
2021-06-07Refactor: Extract render_summary from render_impl.Jacob Hoffman-Andrews-78/+86
This allows for a more readable straight-through logic in render_impl without need for a closure.
2021-06-05Fix invalid ID value in all.html fileGuillaume Gomez-2/+8
2021-06-03Auto merge of #84834 - GuillaumeGomez:sidebar-unification, r=jshabors-37/+30
Sidebar unification This PR does a few things: * Put crates list at all levels (before, it was only on the "top" items) * Fix bug in module sidebar: the list of items was from the parent module. The other changes (on bootstrap mostly) were to allow to generate multiple crates in a same folder so that we can ensure that clicking on the crates in the sidebar works as expected. I added a rustdoc-gui test to ensure everything is where it should be. r? `@jyn514`
2021-06-02Remove data-level selectors from CSS.Jacob Hoffman-Andrews-10/+6
2021-06-01Don't generate impl-items div container if there is noneGuillaume Gomez-4/+6
2021-06-01Remove invalid usage of aria-levelGuillaume Gomez-6/+6
2021-06-01Replace h3 and h4 containing invalid DOMGuillaume Gomez-12/+30
2021-06-01Rollup merge of #85622 - jsha:untoggle-undocumented, r=GuillaumeGomezGuillaume Gomez-10/+4
Remove toggle for "undocumented items." Per discussion in #84326. For trait implementations, this was misleading: the items actually do have documentation (but it comes from the trait definition). For both trait implementations and trait implementors, this was redundant: in both of those cases, the items are default-hidden by different toggle at the level above. Update tests: Remove XPath selectors that over-specified on details tag, in cases that weren't testing toggles. Add an explicit test for toggles on methods. Rename item-hide-threshold to toggle-item-contents for consistency. Demo: https://hoffman-andrews.com/rust/untoggle-undocumented/std/string/struct.String.html https://hoffman-andrews.com/rust/untoggle-undocumented/std/io/trait.Read.html
2021-05-31Improve display of the separation between page items and siblings in the sidebarGuillaume Gomez-1/+1
2021-05-31* Put crates list at all levelsGuillaume Gomez-37/+30
* Fix bug in module sidebar: the list of items was from the parent module