about summary refs log tree commit diff
path: root/src/librustdoc/html
AgeCommit message (Collapse)AuthorLines
2022-01-17fix #90187: Replace all def_id_no_primitives with def_idzredb-1/+1
2022-01-17fix #90187zredb-6/+17
2022-01-17fix #90187zredb-13/+10
2022-01-17Rollup merge of #92937 - GuillaumeGomez:dot-separator, r=jshaMatthias Krüger-3/+7
rustdoc: Add missing dot separator Fixes #92901. ![Screenshot from 2022-01-15 17-47-18](https://user-images.githubusercontent.com/3050060/149631249-e2c0c3a4-9ed8-48e2-92cc-79a5bb347b35.png) r? ``@jsha``
2022-01-17Rollup merge of #92795 - jsha:link-to-top, r=GuillaumeGomezMatthias Krüger-1/+1
Link sidebar "location" heading to top of page This makes it easy, when you are scrolled far down in a page, to jump back to the top. Demo: https://rustdoc.crud.net/jsha/link-to-top/std/string/struct.String.html r? ``@GuillaumeGomez``
2022-01-16Replace NestedVisitorMap with NestedFilterCameron Steffen-4/+5
2022-01-15Fix missing dot separatorGuillaume Gomez-3/+7
2022-01-15Remove `collect`Roc Yu-3/+1
2022-01-14Add support for "always theme" in settingJacob Hoffman-Andrews-4/+41
2022-01-14Pick themes on settings page, not every pageJacob Hoffman-Andrews-11/+11
This hides the paintbrush icon on most pages by default, in preference for the settings on the settings page. When loading from a local file, and not in mobile view, continue to show the theme picker. That's because some browsers limit access to localStorage from file:/// URLs, so choosing a theme from settings.html doesn't take effect.
2022-01-14Enable wrapping words by defaultJacob Hoffman-Andrews-0/+16
Faced with a very long word, browsers will let it overflow its box horizontally rather than break it in the middle. We essentially never want that behavior. We would rather break the word and keep it inside its horizontal limits. So we apply a default overflow-wrap: break-word/anywhere to the document as a while. In some contexts we would rather add a horizontal scrollbar (code blocks), or elide the excess text with an ellipsis (sidebar). Those still work as expected.
2022-01-15Rollup merge of #92868 - pierwill:librustdoc-clippy, r=camelidMatthias Krüger-8/+6
librustdoc: Address some clippy lints
2022-01-14Auto merge of #91948 - nnethercote:rustdoc-more-Symbols, r=GuillaumeGomezbors-141/+234
rustdoc: avoid many `Symbol` to `String` conversions. Particularly when constructing file paths and fully qualified paths. This avoids a lot of allocations, speeding things up on almost all examples. r? `@GuillaumeGomez`
2022-01-14Document and test `UrlPartsBuilder::push_fmt`Noah Lev-0/+23
2022-01-14Make `AVG_PART_LENGTH` a power of 2Noah Lev-3/+10
I seem to recall that in general, it's best to request an allocation with a size that's a power of 2. The low estimate of 5 was probably a little too low as well.
2022-01-14Estimate path length instead of hardcoding 64 bytesNoah Lev-2/+10
2022-01-14Use UrlPartsBuilder and remove `join_with_slash`Noah Lev-36/+16
2022-01-14rustdoc: remove some unnecessary sigils.Nicholas Nethercote-1/+1
2022-01-14rustdoc: remove many unnecessary `.as_ref()` calls.Nicholas Nethercote-38/+29
2022-01-14rustdoc: avoid many `Symbol` to `String` conversions.Nicholas Nethercote-92/+176
Particularly when constructing file paths and fully qualified paths. This avoids a lot of allocations, speeding things up on almost all examples.
2022-01-14Link sidebar "location" heading to top of pageJacob Hoffman-Andrews-1/+1
This makes it easy, when you are scrolled far down in a page, to jump back to the top.
2022-01-14Rollup merge of #92854 - Urgau:better-rust-logo, r=GuillaumeGomezMatthias Krüger-3/+65
Use the updated Rust logo in rustdoc This pull-request use the updated Rust logo from https://github.com/rust-lang/rust-artwork/pull/9 and also change the logo format from PNG to SVG. | Before | After | | --- | --- | | ![Screenshot 2022-01-13 at 14-33-40 std - Rust](https://user-images.githubusercontent.com/3616612/149342697-7afe4c3e-2be5-444b-86f3-118712b4f7ae.png) | ![Screenshot 2022-01-13 at 14-33-15 std - Rust](https://user-images.githubusercontent.com/3616612/149342705-54ed27c6-0806-4c2d-baa1-4d65ed897e2b.png) | I also took the liberty to update the two PNG favicons with the SVG reducing their size by ~35% each. Fixes https://github.com/rust-lang/rust/issues/92831 r? ```@jsha```
2022-01-13librustdoc: Address some clippy lintspierwill-8/+6
Also ignore clippy's "collapsible if..." lints.
2022-01-13rustdoc: decouple stability and const-stabilityAndy Russell-36/+55
2022-01-13Regenerate the PNGs favicon with the updated Rust logoLoïc BRANSTETT-0/+0
2022-01-13Use the updated Rust logo and change it's format to SVGLoïc BRANSTETT-3/+65
2022-01-13Rollup merge of #91687 - euclio:tuple-variant-field-section, r=GuillaumeGomezMatthias Krüger-5/+14
rustdoc: do not emit tuple variant fields if none are documented Fixes #90824. Before: ![2021-12-15T22:26:41](https://user-images.githubusercontent.com/1372438/146302871-4d265433-b9aa-4e53-adfb-e7cb92107180.png) After: ![2021-12-15T22:27:01](https://user-images.githubusercontent.com/1372438/146302872-e39eda3d-2fb2-4fb9-aae7-2008e4e1b4dd.png)
2022-01-13Auto merge of #92526 - djc:rustdoc-askama, r=jshabors-270/+15
Migrate rustdoc from Tera to Askama See #84419. Should probably get a benchmarking run to verify if it has the intended effect on rustdoc performance. cc `@jsha` `@jyn514.`
2022-01-12Rollup merge of #92764 - GuillaumeGomez:fix-rust-logo-style, r=jshaMatthias Krüger-3/+3
Fix rust logo style The style on the rust logo is currently broken: ![Screenshot from 2022-01-11 13-36-30](https://user-images.githubusercontent.com/3050060/148946754-a1a57253-bed0-44cf-a41c-83e0eecbd6b5.png) With this fix, we're back to normal: ![Screenshot from 2022-01-11 13-42-07](https://user-images.githubusercontent.com/3050060/148946778-99f44678-aac1-419f-bb8c-ffa837e0c1ee.png) I also used a GUI test to prevent future silent regressions. r? ```@jsha```
2022-01-12Rollup merge of #92742 - GuillaumeGomez:missing-suffix-sidebar-items, ↵Matthias Krüger-2/+6
r=notriddle Add missing suffix for sidebar-items script path Fixes https://github.com/rust-lang/docs.rs/issues/1590. r? ```@syphar```
2022-01-12Rollup merge of #92699 - camelid:private-fields, r=jshaMatthias Krüger-5/+3
rustdoc: Display "private fields" instead of "fields omitted" Also: * Always use `/* */` block comments * Use the same message everywhere, rather than sometimes prefixing with "some" When I first read rustdoc docs, I was confused why the fields were being omitted. It was only later that I realized it was because they were private. It's also always bothered me that rustdoc sometimes uses `//` and sometimes uses `/*` comments for these messages, so this change makes them all use `/*`. Technically, I think fields can be omitted if they are public but `doc(hidden)` too, but `doc(hidden)` is analogous to privacy. It's really just used to emulate "doc privacy" when -- because of technical limitations -- an item has to be public. So I think it's fine to include this under the category of "private fields". r? ```@jsha```
2022-01-11rustdoc: do not emit tuple variant fields if none are documentedAndy Russell-5/+14
2022-01-11Store a `Symbol` instead of an `Ident` in `VariantDef`/`FieldDef`Aaron Hill-2/+2
The field is also renamed from `ident` to `name. In most cases, we don't actually need the `Span`. A new `ident` method is added to `VariantDef` and `FieldDef`, which constructs the full `Ident` using `tcx.def_ident_span()`. This method is used in the cases where we actually need an `Ident`. This makes incremental compilation properly track changes to the `Span`, without all of the invalidations caused by storing a `Span` directly via an `Ident`.
2022-01-11Fix style for rust logoGuillaume Gomez-3/+3
2022-01-10Add missing suffix for sidebar-items script pathGuillaume Gomez-2/+6
2022-01-10Remove configuration which became unused in ↵Dirkjan Ochtman-5/+0
8abb4bb698c9d74507adb9cd7b54a032f3c1b595
2022-01-10Address feedbackDirkjan Ochtman-7/+3
2022-01-10Migrate rustdoc from Tera to AskamaDirkjan Ochtman-260/+14
See #84419.
2022-01-10Rollup merge of #92602 - jsha:source-link-2, r=GuillaumeGomezMatthias Krüger-52/+62
Make source links look cleaner Change from syntaxy-looking [src] to the plain word "source". Change the syntaxy-looking `[-]` at the top of the page to say "collapse". Reduce opacity of rightside content. Part of #59851 r? `@GuillaumeGomez` Demo: https://rustdoc.crud.net/jsha/source-link-2/std/string/struct.String.html [Discussed on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/display.20of.20source.20link).
2022-01-09Display "private fields" instead of "fields omitted"Noah Lev-5/+3
Also: * Always use `/* */` block comments * Use the same message everywhere, rather than sometimes prefixing with "some" When I first read rustdoc docs, I was confused why the fields were being omitted. It was only later that I realized it was because they were private. It's also always bothered me that rustdoc sometimes uses `//` and sometimes uses `/*` comments for these messages, so this change makes them all use `/*`. Technically, I think fields can be omitted if they are public but `doc(hidden)` too, but `doc(hidden)` is analogous to privacy. It's really just used to emulate "doc privacy" when -- because of technical limitations -- an item has to be public. So I think it's fine to include this under the category of "private fields".
2022-01-09Rollup merge of #92673 - GuillaumeGomez:remove-all-items-toggle, r=jshaMatthias Krüger-8/+0
Remove useless collapse toggle on "all items" page When clicking on this toggle, nothing happens because there is nothing to collapse. Instead of keeping it around, let's just remove it. Before: ![Screenshot from 2022-01-08 16-02-38](https://user-images.githubusercontent.com/3050060/148649149-821a1e77-8c34-4975-b50a-984ca8865518.png) After: ![Screenshot from 2022-01-08 16-02-32](https://user-images.githubusercontent.com/3050060/148649154-b5912a97-9229-46bd-be3c-df3c3fa3ac8f.png) r? `@jsha`
2022-01-09Rollup merge of #92490 - jsha:crates-in-results, r=GuillaumeGomezMatthias Krüger-28/+35
Move crate drop-down to search results page This reduces clutter on doc pages. Part of #59840 r? ```@GuillaumeGomez``` Demo: https://rustdoc.crud.net/jsha/crates-in-results/std/index.html?search=str
2022-01-08Remove useless collapse toggle on "all items" pageGuillaume Gomez-8/+0
2022-01-08Make source links look cleanerJacob Hoffman-Andrews-52/+62
Change from syntaxy-looking [src] to the plain word "source".
2022-01-07Rollup merge of #92610 - GuillaumeGomez:css-class-instead-of-inline-style, ↵Eric Huss-2/+6
r=jsha Create CSS class instead of using inline style for search results I saw this change in the update you proposed in https://github.com/rust-lang/rust/pull/92404. :) r? ``@jsha``
2022-01-06Create CSS class instead of using inline style for search resultsGuillaume Gomez-2/+6
2022-01-06Rollup merge of #92404 - GuillaumeGomez:src-font-size, r=jshaMatthias Krüger-13/+7
Fix font size for [src] links in headers Fixes #90384. cc `@jsha` r? `@camelid`
2022-01-06Rollup merge of #92058 - jsha:run-on-hover, r=GuillaumeGomezMatthias Krüger-1/+4
Make Run button visible on hover This slightly reduces the noisiness of doc pages, making them easier to read. Demo: https://rustdoc.crud.net/jsha/run-on-hover/std/string/struct.String.html [Discussed on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/.22Run.22.20button.20visible.20on.20hover). Part of #59845
2022-01-05Simplify :target CSS selectorGuillaume Gomez-12/+3
2022-01-05Move crate drop-down to search results pageJacob Hoffman-Andrews-28/+35
This reduces clutter on doc pages.