about summary refs log tree commit diff
path: root/src/librustdoc/html
AgeCommit message (Collapse)AuthorLines
2022-06-06Add "no-confusing-arrow" eslint checkGuillaume Gomez-1/+2
2022-06-06Rollup merge of #90905 - GuillaumeGomez:empty-impl-blocks, r=jshaMatthias Krüger-1/+14
Add empty impl blocks if they have documentation Fixes https://github.com/rust-lang/rust/issues/90866. The update for the test script is needed to count the number of impl blocks we have with only the struct. To be noted that with https://github.com/rust-lang/rust/pull/89676 merged, it wouldn't be needed (I don't know what is the status of it btw. cc ```@Mark-Simulacrum).``` It looks like this: ![Screenshot from 2021-11-14 16-51-28](https://user-images.githubusercontent.com/3050060/141689100-e57123c0-bf50-4c42-adf5-d991e169a0e4.png) cc ```@jyn514``` r? ```@camelid```
2022-06-04Don't generate "Impls on Foreign Types" for stdJacob Hoffman-Andrews-4/+3
Hack: many traits and types in std are re-exported from core or alloc. In general, rustdoc is capable of recognizing these implementations as being on local types. However, in at least one case, rustdoc gets confused and labels an implementation as being on a foreign type. To make sure that confusion doesn't pass on to the reader, consider all implementations in std, core, and alloc to be on local types.
2022-06-03Rollup merge of #97681 - GuillaumeGomez:more-eslint, r=Dylan-DPCDylan DPC-0/+8
Add more eslint checks A new batch of eslint rules: * [no-fallthrough](https://eslint.org/docs/rules/no-fallthrough) * [no-invalid-regexp](https://eslint.org/docs/rules/no-invalid-regexp) * [no-import-assign](https://eslint.org/docs/rules/no-import-assign) * [no-self-compare](https://eslint.org/docs/rules/no-self-compare) * [no-template-curly-in-string](https://eslint.org/docs/rules/no-template-curly-in-string) * [block-scoped-var](https://eslint.org/docs/rules/block-scoped-var) * [guard-for-in](https://eslint.org/docs/rules/guard-for-in) * [no-alert](https://eslint.org/docs/rules/no-alert) r? ``@notriddle``
2022-06-03Add "no-alert" eslint ruleGuillaume Gomez-0/+1
2022-06-03Add "guard-for-in" eslint ruleGuillaume Gomez-0/+1
2022-06-03Add "block-scoped-var" eslint ruleGuillaume Gomez-0/+1
2022-06-03Add "no-template-curly-in-string" eslint ruleGuillaume Gomez-0/+1
2022-06-03Add "no-self-compare" eslint ruleGuillaume Gomez-0/+1
2022-06-03Add "no-import-assign" eslint ruleGuillaume Gomez-0/+1
2022-06-03Add "no-invalid-regexp" eslint ruleGuillaume Gomez-0/+1
2022-06-03Add "no-fallthrough" eslint ruleGuillaume Gomez-0/+1
2022-06-02rustdoc: clean up primitive.slice.html linksMichael Howell-22/+16
2022-06-02Rollup merge of #97613 - jsha:implementation-is-on-local-type, r=GuillaumeGomezYuki Okushi-6/+3
rustdoc: Improve calculation of "Impls on Foreign Types" The existing code to calculate whether an implementation was on a "Foreign Type" was duplicated across the sidebar generation and the page generation. It also came to the wrong conclusion for some cases where both the trait and the "for" type were re-exports. This PR extracts the logic into a method of `Impl`, breaks it into a multi-line method so it can be commented, and adds a case for when the trait and the "for" type came from the same crate. This fixes some cases - like the platform-specific integer types (`__m256`, `__m128`, etc). But it doesn't fix all cases. See the screenshots below. [Before](https://doc.rust-lang.org/nightly/std/clone/trait.Clone.html#foreign-impls): <img src="https://user-images.githubusercontent.com/220205/171338226-59ce6daf-3d76-4bad-bc8d-72a8259a8f43.png" width=200> [After](https://rustdoc.crud.net/jsha/implementation-is-on-local-type/std/clone/trait.Clone.html): <img src="https://user-images.githubusercontent.com/220205/171338147-28308a65-1597-4223-be47-9550062404dd.png" width=200> The remaining types (`CString`, `NulError`, etc) are all from the `alloc` crate, while the `Clone` trait is from the `core` crate. Since `CString` and `Clone` are both re-exported by `std`, they are logically local to each other, but I couldn't figure out a good way to detect that in this code. I figure this is still a good step forward. Related: #97610 r? `@camelid`
2022-06-01Improve calculation of "Impls on Foreign Types"Jacob Hoffman-Andrews-6/+3
2022-05-31rustdoc: also index raw pointersMichael Howell-2/+3
Co-authored-by: Noah Lev <camelidcamel@gmail.com>
2022-05-31rustdoc: also index impl traitMichael Howell-6/+24
2022-05-31Fix theme checksGuillaume Gomez-0/+3
2022-05-31Display empty impl blocks if they have documentationsGuillaume Gomez-1/+11
2022-05-31Rollup merge of #97089 - GuillaumeGomez:improve-settings-theme-display, r=jshaDylan DPC-47/+117
Improve settings theme display This is a follow-up of #96958. In this PR, I changed how the theme radio buttons are displayed and improved their look as well. It now looks like this: ![Screenshot from 2022-05-17 20-46-20](https://user-images.githubusercontent.com/3050060/168887703-a01e3bd5-9644-4012-ac11-2ae7bacd6be6.png) ![Screenshot from 2022-05-17 20-46-12](https://user-images.githubusercontent.com/3050060/168887707-132f8b2d-1163-462f-b7dd-f861121bdee7.png) You can test it [here](https://rustdoc.crud.net/imperio/improve-settings-theme-display/doc/foo/index.html). r? `@jsha`
2022-05-30Fix invalid line number computation when clicking on something else than a ↵Guillaume Gomez-0/+4
line number
2022-05-30Fix display of `<details>`/`<summary>` in doc blocksGuillaume Gomez-10/+3
2022-05-30Improve display of `<details>` in doc blocksGuillaume Gomez-2/+14
2022-05-30Move theme rules out of settings.cssGuillaume Gomez-16/+39
2022-05-30Improve display of settings radio buttonsGuillaume Gomez-31/+78
2022-05-30Auto merge of #97489 - GuillaumeGomez:settings-js-disabled, r=notriddlebors-0/+5
Add sentence in case JS is disabled on settings.html page Instead of having an empty page, it'll look like this: ![Screenshot from 2022-05-28 17-46-23](https://user-images.githubusercontent.com/3050060/170833333-e1a59c2b-27ca-47da-9c08-2356e4a689cb.png) r? `@notriddle`
2022-05-29Rollup merge of #97530 - GuillaumeGomez:more-eslint-checks, r=jshaMichael Goulet-0/+7
Add more eslint checks Here is a new batch of eslint checks: * [no-const-assign](https://eslint.org/docs/rules/no-const-assign) * [no-debugger](https://eslint.org/docs/rules/no-debugger) * [no-dupe-args](https://eslint.org/docs/rules/no-dupe-args) * [no-duple-else-if](https://eslint.org/docs/rules/no-dupe-else-if) * [no-dupe-keys](https://eslint.org/docs/rules/no-dupe-keys) * [no-duplicate-case](https://eslint.org/docs/rules/no-duplicate-case) * [no-ex-assign](https://eslint.org/docs/rules/no-ex-assign) r? ``@notriddle``
2022-05-29Add "no-ex-assign" eslint ruleGuillaume Gomez-0/+1
2022-05-29Add "no-duplicate-case" eslint ruleGuillaume Gomez-0/+1
2022-05-29Add "no-dupe-keys" eslint ruleGuillaume Gomez-0/+1
2022-05-29Add "no-dupe-else-if" eslint ruleGuillaume Gomez-0/+1
2022-05-29Add "no-dup-args" eslint ruleGuillaume Gomez-0/+1
2022-05-29Add "no-debugger" eslint ruleGuillaume Gomez-0/+1
2022-05-29Add "no-const-assign" eslint ruleGuillaume Gomez-0/+1
2022-05-29Fix order of closing HTML elements in rustdoc outputJan-Erik Rediger-1/+1
2022-05-29Auto merge of #96652 - notriddle:notriddle/self, r=GuillaumeGomezbors-16/+55
rustdoc: include impl generics / self in search index Fixes #92205
2022-05-28Improve settings page display with disabled javascriptGuillaume Gomez-0/+5
2022-05-28Auto merge of #97433 - GuillaumeGomez:rm-refcell-context, r=notriddlebors-111/+128
Pass Context as a &mut to allow to remove RefCell fields Fixes #90323. r? `@notriddle`
2022-05-27Add "eqeqeq" eslint ruleGuillaume Gomez-6/+7
2022-05-27Add "no-unused-vars" eslint ruleGuillaume Gomez-0/+7
2022-05-27Add "arrow-parens" eslint ruleGuillaume Gomez-0/+1
2022-05-27Pass Context as a &mut to allow to remove RefCell fieldsGuillaume Gomez-111/+128
2022-05-27cleanup librustdoc by making parent stack store itemsMichael Howell-15/+2
2022-05-26rustdoc: factor orphan impl items into an actual structMichael Howell-5/+7
2022-05-26Rollup merge of #97394 - GuillaumeGomez:more-eslint-rules, r=notriddleGuillaume Gomez-7/+14
Add more eslint rules This PR adds more eslint rules. Here are the explanations for each of them: * [space-infix-ops](https://eslint.org/docs/rules/space-infix-ops) * [space-before-function-paren](https://eslint.org/docs/rules/space-before-function-paren) * [space-before-blocks](https://eslint.org/docs/rules/space-before-blocks) * [comma-dangle](https://eslint.org/docs/rules/comma-dangle) * [comma-style](https://eslint.org/docs/rules/comma-style) * [max-len](https://eslint.org/docs/rules/max-len) * [eol-last](https://eslint.org/docs/rules/eol-last) r? `@notriddle`
2022-05-26Rollup merge of #97317 - GuillaumeGomez:gui-settings-text-click, r=jshaGuillaume Gomez-36/+39
Allow to click on setting text You can test it [here](https://rustdoc.crud.net/imperio/gui-settings-text-click/doc/foo/index.html). This PR allows to click on the text alongside the toggle to change it. r? `@jsha`
2022-05-25rustdoc: include impl generics / self in search indexMichael Howell-13/+63
2022-05-25Add new eslint rule "eol-last"Guillaume Gomez-0/+1
2022-05-25Add new eslint rule "max-len"Guillaume Gomez-0/+1
2022-05-25Add new eslint rule "comma-style"Guillaume Gomez-0/+1