about summary refs log tree commit diff
path: root/src/librustdoc/html
AgeCommit message (Collapse)AuthorLines
2020-07-20Migrate rustc_depr uses to use deprecation attributeMark Rousskov-20/+9
This should not be a change in behavior.
2020-07-20Rollup merge of #74555 - GuillaumeGomez:important-traits-popup, r=ManishearthManish Goregaokar-0/+5
Improve "important traits" popup display on mobile I implemented what @XAMPPRocky suggested in the [internals thread topic](https://internals.rust-lang.org/t/feedback-on-important-traits-rustdoc-feature/12752/18). I can confirm it works nicely. r? @Manishearth @Manishearth: By the way: I realized that when you click on the "i", you have to click again to make the popup disappear. Do you want me to extend the popup removal to any click outside the popup?
2020-07-20Rollup merge of #74505 - Cldfire:fix-search-focus, r=GuillaumeGomezManish Goregaokar-10/+0
Fix search input focus in ayu theme Closes #74496. Before: ![image](https://user-images.githubusercontent.com/13814214/87868463-d0c8fe80-c963-11ea-9003-aa578d869e98.png) After: ![image](https://user-images.githubusercontent.com/13814214/87868467-dc1c2a00-c963-11ea-89a8-1280f68ff9df.png)
2020-07-20Improve "important traits" popup display on mobileGuillaume Gomez-0/+5
2020-07-19Ayu: use different background color to make Run button easy-to-spotLzu Tao-4/+3
Co-authored-by: Cldfire <cldfire@3grid.net>
2020-07-19Fix search input focus in ayu themeJarek Samic-10/+0
2020-07-19Add an border around the Run buttonLzu Tao-0/+1
2020-07-17Fix tidy issuesGuillaume Gomez-23/+35
2020-07-17Convert whitespaces to tabsGuillaume Gomez-44/+54
2020-07-17Improve logo image display in different themesGuillaume Gomez-0/+12
2020-07-16Rollup merge of #74371 - Aloso:patch-1, r=GuilliameGomezManish Goregaokar-9/+6
Improve ayu rustdoc theme This PR changes the following: * It makes some lines darker * It gives the crate selector and search bar a border * The search bar's border turns blue when focused * ~~Gives the logo a bright shadow.~~ For standard library crates, it would be better to invert the logo, but that would be bad for crates with a colored logo, e.g. [async-std](https://docs.rs/async-std/1.6.2/async_std/). Before: ![old](https://user-images.githubusercontent.com/15658558/87576611-ed4e0800-c6d1-11ea-9667-3924702f79e2.png) After (note that this PR no longer includes the white shadow of the logo): ![new](https://user-images.githubusercontent.com/15658558/87576621-ef17cb80-c6d1-11ea-8e15-5d7f8b180c07.png)
2020-07-16Rollup merge of #74351 - lzutao:remove-rustc-internal-compiler-warns, ↵Manish Goregaokar-44/+17
r=Mark-Simulacrum Do not render unstable items for rustc doc See the zulip conversion: https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/rustc.20doc.3A.20.22internal.20compiler.20API.22.20warns.20are.20everywhere!/near/203850782 Before: ![image](https://user-images.githubusercontent.com/15225902/87501971-9cff8780-c68a-11ea-93b4-ea53ce18a77b.png) After: ![image](https://user-images.githubusercontent.com/15225902/87501985-a7218600-c68a-11ea-81c0-a6b5b120832c.png) Nothing changes in unstable items of std: Before: ![image](https://user-images.githubusercontent.com/15225902/87502004-b7d1fc00-c68a-11ea-9224-a27a1d2a81d6.png) After: ![image](https://user-images.githubusercontent.com/15225902/87502018-c0c2cd80-c68a-11ea-9773-4c63158025cb.png) Closes #54682
2020-07-16Rollup merge of #74370 - Manishearth:re-spotlight, r=GuillaumeGomezManish Goregaokar-14/+163
Reintroduce spotlight / "important traits" feature (Reopened version of https://github.com/rust-lang/rust/pull/74111 because Github is broken, see discussion there) Fixes https://github.com/rust-lang/rust/issues/73785 This PR reintroduces the "spotlight" ("important traits") feature. A couple changes have been made: As there were concerns about its visibility, it has been moved to be next to the return type, as opposed to being on the side. It also no longer produces a modal, it shows the traits on hover, and it can be clicked on to pin the hover bubble. ![image](https://user-images.githubusercontent.com/1617736/86674555-a82d2600-bfad-11ea-9a4a-a1a9ffd66ae5.png) ![image](https://user-images.githubusercontent.com/1617736/86674533-a1061800-bfad-11ea-9e8a-c62ad86ed0d7.png) It also works fine on mobile: ![image](https://user-images.githubusercontent.com/1617736/86674638-bda25000-bfad-11ea-8d8d-1798b608923e.png)
2020-07-16Rollup merge of #74359 - lzutao:rustdoc-tostring, r=GuillaumeGomezManish Goregaokar-13/+14
rustdoc: Rename internal API fns to `into_string` to avoid surprising listed in API guidelines.
2020-07-16Rollup merge of #74325 - GuillaumeGomez:focus-source-file-sidebar, r=kinnisonManish Goregaokar-0/+5
Focus on the current file in the source file sidebar Fixes #73360. r? @kinnison cc @rust-lang/rustdoc
2020-07-16Rollup merge of #73807 - euclio:rustdoc-highlighting, r=ollie27,GuillaumeGomezManish Goregaokar-22/+133
rustdoc: glue tokens before highlighting Fixes #72684. This commit also modifies the signature of `Classifier::new` to avoid copying the source being highlighted.
2020-07-16Don't position:relative on all presManish Goregaokar-1/+6
We need it for run buttons (https://github.com/rust-lang/rust/pull/44671), but not function defs
2020-07-16Remove !important on border-color and background-colorManish Goregaokar-10/+7
2020-07-16Add Ayu theme for spotlightManish Goregaokar-0/+5
2020-07-16Review comments for JSManish Goregaokar-8/+2
2020-07-16Make spotlight show on hoverManish Goregaokar-156/+53
This makes the spotlight show on hover instead of click. Clicks can be used to persist it, which is also what's used on mobile.
2020-07-16Move spotlight next to the return typeManish Goregaokar-36/+14
2020-07-16Revert "Remove "important traits" feature"Manish Goregaokar-8/+281
This reverts commit 1244ced9580b942926afc06815e0691cf3f4a846.
2020-07-16Remove elements iterator clone and only keep first element insteadGuillaume Gomez-3/+3
2020-07-15Remove drop-shadowLudwig Stecher-5/+0
2020-07-15Rollup merge of #74218 - GuillaumeGomez:search-results-bottom-margin, ↵Manish Goregaokar-0/+1
r=Dylan-DPC Add margin after doc search results I found it not really on computer that the last result is right at the bottom of the page. I find it better with margin below (especially when you hover the last element!). A screenshot to show the result: ![Screenshot from 2020-07-10 16-32-23](https://user-images.githubusercontent.com/3050060/87166097-6103a580-c2cb-11ea-81a8-12772cf20f64.png) r? @kinnison cc @rust-lang/rustdoc @Manishearth @jyn514
2020-07-15Rollup merge of #74196 - GuillaumeGomez:auto-collapse-implementors, ↵Manish Goregaokar-4/+11
r=Manishearth Add option to collapse automatically implementors Fixes #73403 It adds an option (enabled by default) which collapses all implementors impl blocks. r? @kinnison cc @rust-lang/rustdoc
2020-07-15Improve ayu rustdoc themeLudwig Stecher-9/+11
* It makes some lines darker * It gives the crate selector and search bar a border * The search bar's border turns blue when focused * Gives the logo a bright shadow. This makes dark logos stand out more
2020-07-15Improve settings wordingGuillaume Gomez-2/+2
2020-07-15rustdoc: Rename internal API fns to `into_string`Lzu Tao-13/+14
to avoid surprising listed in API guidelines.
2020-07-15Remove unused CSS rules for internal rustc itemsLzu Tao-16/+0
2020-07-15Don't render unstable for rustc docsLzu Tao-28/+17
As rustc is permanently unstable. So marking every items with unstable is essential useless.
2020-07-14rustdoc: glue tokens before highlightingAndy Russell-22/+133
Fixes #72684. This commit also modifies the signature of `Classifier::new` to avoid copying the source being highlighted.
2020-07-14Rollup merge of #71237 - Cldfire:rustdoc-ayu-theme, r=GuilliaumeGomezManish Goregaokar-41/+644
Add Ayu theme to rustdoc This is a port of a theme I maintain (https://github.com/Cldfire/ayu-rs) to the native rustdoc theme system. [Ayu](https://github.com/dempfi/ayu) (dark) is a richly-colored dark theme that many people enjoy using across a wide variety of environments. Corresponds to the Ayu theme in [mdBook](https://github.com/rust-lang/mdBook). Some screenshots: ![image](https://user-images.githubusercontent.com/13814214/79547087-6c935780-8061-11ea-8a33-38e9472e9fec.png) ![image](https://user-images.githubusercontent.com/13814214/79547150-8339ae80-8061-11ea-97be-9e13a8b275d7.png) ![image](https://user-images.githubusercontent.com/13814214/79547221-98164200-8061-11ea-9649-9b11ccbb33e3.png) ![image](https://user-images.githubusercontent.com/13814214/79547310-b419e380-8061-11ea-9965-d4f90b2280ab.png) ![image](https://user-images.githubusercontent.com/13814214/79547443-e7f50900-8061-11ea-8872-06d74010691e.png) Note that this pull request also makes some small code changes to allow for disabling theme stylesheets, preventing the rules from all the different themes from conflicting with one another. The only stylesheet that is not disabled is `light.css`; the theming system (quite hackily) switches themes by changing the href on this stylesheet and so permanently disabling all the others works perfectly fine.
2020-07-14Focus on the current file in the source file sidebarGuillaume Gomez-0/+5
2020-07-12Add Ayu theme to rustdocJarek Samic-0/+571
2020-07-12Clean up handling of style files in rustdocJarek Samic-41/+73
Disable all themes other than `light.css` to prevent rule conflicts
2020-07-11rustdoc: insert newlines between attributesAndy Russell-8/+13
2020-07-10Add margin after doc search resultsGuillaume Gomez-0/+1
2020-07-10Avoid "whitelist"Tamir Duberstein-2/+2
Other terms are more inclusive and precise.
2020-07-09Add option to collapse automatically implementorsGuillaume Gomez-3/+10
2020-07-09Rollup merge of #74107 - nbdd0121:rustdoc, r=GuillaumeGomezManish Goregaokar-1/+7
Hide `&mut self` methods from Deref in sidebar if there are no `DerefMut` impl for the type. This partially addresses #74083.
2020-07-09Auto merge of #74131 - ollie27:rustdoc_invalid_codeblock_attributes_name, ↵bors-1/+1
r=GuillaumeGomez rustdoc: Rename invalid_codeblock_attribute lint to be plural Lint names should be plural as per the lint naming conventions: https://github.com/rust-lang/rfcs/blob/master/text/0344-conventions-galore.md#lints r? @GuillaumeGomez
2020-07-07rustdoc: Rename invalid_codeblock_attribute lint to be pluralOliver Middleton-1/+1
2020-07-06Rollup merge of #74067 - rye:rustdoc-fqn-hover-underline, r=GuillaumeGomezManish Goregaokar-0/+3
rustdoc: Restore underline text decoration on hover for FQN in header This causes the components of FQN's (e.g. `std`, `net`, and `Ipv4Addr` of the FQN `std::net::Ipv4Addr`) to behave similarly to other links in the contents of rustdoc-styled pages. When the user hovers over them, more clearly indicating that they can be used for navigation. I (and I hope others at least in part) have found the prior design to be somewhat confusing, as it is not clear (upon hovering) that the various parts of the FQN are actually links that the user can navigate to. <details><summary>📸 Before, mouse hovered over "net" in the FQN</summary> <img alt="A rustdoc page with the mouse hovered over the fully-qualified name in the page header, producing no visual change" src="https://user-images.githubusercontent.com/1566689/86538363-4c827000-bebb-11ea-8291-5ea6b85d7e19.png" /> </details> <details><summary>📸 After, mouse hovered over "net" in the FQN</summary> <img alt="A rustdoc page with the mouse hovered over the fully-qualified name in the page header, now with an underline showing up under the word hovered over by the mouse" src="https://user-images.githubusercontent.com/1566689/86538471-d3374d00-bebb-11ea-9bb3-7aa2d7a4800b.png" /> </details>
2020-07-06Hide `&mut self` methods from Deref in sidebarGary Guo-1/+7
If there are no `DerefMut` impl for the type.
2020-07-05rustdoc: Restore underline text decoration on hover for FQN in headerKristofer Rye-0/+3
This causes the components of FQN's to behave similarly to other links in the contents of rustdoc-styled pages. I (and I hope others at least in part) have found the prior design to be somewhat confusing, as it is not clear (upon hovering) that the various parts of the FQN are actually links that the user can navigate to. In short, this patch makes links in the FQN have an underline when the user hovers over them, more clearly indicating that they can be used for navigation. Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com>
2020-07-02Remove render-redirect-pages option in rustdocGuillaume Gomez-49/+0
2020-07-02Simplify DOM by removing IDs for code tagsGuillaume Gomez-52/+16
2020-07-02Expand sub code blocks block content when hidden when the page hash refers to itGuillaume Gomez-0/+8