summary refs log tree commit diff
path: root/src/librustdoc/html/render/mod.rs
AgeCommit message (Collapse)AuthorLines
2021-09-01Auto merge of #88490 - GuillaumeGomez:associated-types-implementors-display, ↵bors-29/+62
r=camelid,Manishearth Display associated types of implementors Fixes #86631. Contrary to before, it doesn't display methods. I also had to "resurrect" the `auto-hide-trait-implementations` setting. :3 Only question at this point: should I move the `render_impl` boolean arguments into one struct? We're starting to have quite a lot of them... cc `@cynecx` r? `@camelid`
2021-09-01Remove implementors settingGuillaume Gomez-1/+0
2021-09-01Clean render_impl argumentsGuillaume Gomez-36/+52
2021-08-31Remove bolding on associated constantsNoah Lev-1/+1
Associated types don't get bolded, so it looks off to have one kind bolded and one not.
2021-08-30Put back "auto-collapse-implementors" settingGuillaume Gomez-0/+1
2021-08-30Put back display of associated items (types and consts)Guillaume Gomez-7/+24
2021-08-22Move Cache from Context to SharedContextJoshua Nelson-18/+17
2021-08-05Remove LightSpan and use Span directlyGuillaume Gomez-1/+1
2021-08-05Wrap the span_map tuple index into a type called "LightSpan"Guillaume Gomez-1/+1
2021-08-05Add links on source types to go to definitionGuillaume Gomez-0/+2
2021-07-29Rollup merge of #87451 - GuillaumeGomez:tuple-struct-field-doc, r=jyn514Yuki Okushi-0/+3
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-25Rustdoc 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-25Add support for tuple structs' fields documentationGuillaume Gomez-0/+3
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