about summary refs log tree commit diff
path: root/src/librustdoc
AgeCommit message (Collapse)AuthorLines
2021-06-22Rollup merge of #86501 - jyn514:doctest-cleanup, r=CraftSpiderYuki Okushi-21/+22
Cleanup handling of `crate_name` for doctests - Remove unnecessary reallocation - Remove unnecessary messing around with `queries` for the crate name; it's simpler and faster to go through the TyCtxt instead - Rename `cratename` -> `crate_name` for consistency with the rest of the compiler
2021-06-22Rollup merge of #86451 - notriddle:notriddle/rustdoc-intra-doc-link-summary, ↵Yuki Okushi-12/+64
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-11/+54
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-22Accept `!{}` and `![]` as macro disambiguatorsLeSeulArtichaut-3/+5
2021-06-22Account for more casesDeadbeef-4/+4
2021-06-21Don't reallocate the crate name when running doctestsJoshua Nelson-5/+7
2021-06-21Rename cratename -> crate_nameJoshua Nelson-17/+17
This makes it consistent with rustc_session::Options.
2021-06-21Remove unnecessary call to queries.crate_name()Joshua Nelson-3/+2
It's much more complicated than just going through the TyCtxt.
2021-06-22Rollup merge of #86334 - LeSeulArtichaut:86120-links-type-aliases, r=jyn514Yuki Okushi-5/+46
Resolve type aliases to the type they point to in intra-doc links This feels a bit sketchy, but I think it's better than just rejecting the link. Helps with #86120, r? ``@jyn514``
2021-06-22Do not list impl when trait has doc(hidden)Deadbeef-1/+18
2021-06-21Fix handling of disambiguator suffixes for intra-doc linksLeSeulArtichaut-27/+10
2021-06-22Rollup merge of #86473 - fee1-dead:rustdoc-const-unstable, r=jyn514Yuki Okushi-47/+90
Rustdoc: Account for const-unstable functions Fixes #86464
2021-06-22Rollup merge of #86274 - alexander-melentyev:spaces, r=bjorn3Yuki Okushi-2/+2
Spaces
2021-06-21Update comment regarding staged_apiDeadbeef-1/+1
2021-06-21Removed/Updated some cases and simplified `match`Deadbeef-1/+1
2021-06-21Check for const_unstable before printing `const`Deadbeef-40/+61
2021-06-21Auto merge of #86157 - jsha:tera, r=jyn514,GuillaumeGomezbors-176/+225
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-21Resolve type aliases to the type they point to in intra-doc linksLeSeulArtichaut-5/+46
2021-06-21Delete spacesAlexander Melentyev-2/+2
2021-06-20Use Tera templates for rustdoc.Jacob Hoffman-Andrews-176/+225
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-116/+109
objects
2021-06-19Rollup merge of #86370 - ↵Yuki Okushi-2/+9
matteo-briani:fix-rustdoc-stabilized-versions-layout, r=GuillaumeGomez Fix rustdoc stabilized versions layout Fixes #86342 r? `@GuillaumeGomez`
2021-06-18Update test cases for intra-doc links in summariesMichael Howell-1/+3
2021-06-18Resolve intra-doc links in summary descMichael Howell-11/+61
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-18rustdoc: Render `<Self as X>::Y` type casts properly across crate boundsJustus K-3/+18
2021-06-18rustdoc: Render `for<'_>` lifetimes in trait objectsJustus K-12/+44
2021-06-18rustdoc: Render `for<'_>` lifetimes in front of where boundJustus K-22/+63
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-17include reference to woff2 files in COPYRIGHT.txtTrevor Spiteri-5/+9
2021-06-17rustdoc: add optional woff2 versions of Source Serif and Source CodeTrevor Spiteri-6/+45
2021-06-17Fix rustdoc stabilized versions layoutMatteo Briani-2/+9
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-39/+37
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-51/+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-18/+24
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-43/+29
2021-06-16Remove methods under Implementors on trait pagesJacob Hoffman-Andrews-22/+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-17Rollup merge of #86361 - GuillaumeGomez:missing-backslashes, r=jshaYuki Okushi-4/+4
Add missing backslashes to prevent unwanted newlines in rustdoc HTML Just adding some forgotten backslashes. r? `@jsha`
2021-06-16Open trait implementations' toggles by default.Jacob Hoffman-Andrews-14/+9
This makes it possible to use Ctrl-F to find methods defined in traits.
2021-06-16Add missing backslashes to prevent unwanted backlines in rustdoc HTMLGuillaume Gomez-4/+4
2021-06-16Rollup merge of #86327 - GuillaumeGomez:safe-intrinsics, r=lqdYuki Okushi-1/+7
Don't mark "safe" intrinsics as unsafe A good example of this is [intrinsics::abort](https://doc.rust-lang.org/nightly/core/intrinsics/fn.abort.html). Before: ![Screenshot from 2021-06-15 14-58-42](https://user-images.githubusercontent.com/3050060/122056942-65ddad00-cdea-11eb-829e-5f5e258387de.png) After: ![Screenshot from 2021-06-15 14-59-22](https://user-images.githubusercontent.com/3050060/122056956-6aa26100-cdea-11eb-94d8-e18b4956cfa4.png) cc ``@jyn514`` r? ``@lqd``
2021-06-16Rollup merge of #86242 - BoxyUwU:rustdoc-const-evaluatable-ice, r=oli-obkYuki Okushi-1/+1
rustdoc- dont ICE on `ConstEvaluatable` predicates Fixes #77647 rustdoc doesn't need to be handling these as you cant write them, they just get added implicitly when you write a where clause containing an expression.
2021-06-15Auto merge of #86321 - JohnTitor:rollup-q61c8q4, r=JohnTitorbors-8/+2
Rollup of 10 pull requests Successful merges: - #80269 (Explain non-dropped sender recv in docs) - #82179 (Add functions `Duration::try_from_secs_{f32, f64}`) - #85608 (Stabilize `ops::ControlFlow` (just the type)) - #85792 (Refactor windows sockets impl methods) - #86220 (Improve maybe_uninit_extra docs) - #86277 (Remove must_use from ALLOWED_ATTRIBUTES) - #86285 (:arrow_up: rust-analyzer) - #86294 (Stabilize {std, core}::prelude::rust_*.) - #86306 (Add mailmap entries for myself) - #86314 (Remove trailing triple backticks in `mut_keyword` docs) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-06-15Don't mark "safe" intrinsics as unsafeGuillaume Gomez-1/+7
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 #86311 - LeSeulArtichaut:cleanup-array-iter, r=jackh726bors-4/+4
Use the now available implementation of `IntoIterator` for arrays