about summary refs log tree commit diff
path: root/src/librustdoc/html
AgeCommit message (Collapse)AuthorLines
2022-05-20Add eslint key-spacing checkGuillaume Gomez-0/+4
2022-05-20Add eslint arrow-spacing checkGuillaume Gomez-0/+4
2022-05-19Add new lint to enforce whitespace after keywordsGuillaume Gomez-2/+6
2022-05-19Add and use stability helper methodsJacob Pratt-4/+1
This avoids an ambiguity (when reading) where `.level.is_stable()` is not immediately clear whether it is general stability or const stability.
2022-05-18Move some DOM generation into the HTML settings file directlyGuillaume Gomez-19/+15
2022-05-18Rollup merge of #97113 - GuillaumeGomez:search-ui-fixes, r=notriddleYuki Okushi-8/+8
Search GUI fixes The first fix is about the duplicated "in": ![Screenshot from 2022-05-17 13-25-53](https://user-images.githubusercontent.com/3050060/168814186-a4e9064f-4325-469c-8bf6-46ea2737a24f.png) The second fix is about the `<select>` broken style: ![Screenshot from 2022-05-17 13-37-03](https://user-images.githubusercontent.com/3050060/168814182-b1c5ae66-d8cf-4fd5-a227-5aa8cd8453ab.png) ![Screenshot from 2022-05-17 13-36-55](https://user-images.githubusercontent.com/3050060/168814184-be9e56f8-fad4-477c-899e-9abff4d4910c.png) You can test it [here](https://rustdoc.crud.net/imperio/search-ui-fixes/doc/foo/index.html?search=test). r? `@notriddle`
2022-05-17rustdoc: make search.js a moduleJacob Hoffman-Andrews-52/+73
Previously, search.js relied on the DOM and the `window` object. It can now be loaded in the absence of the DOM, for instance by Node. The same is true of search-index.js. This allows removing a lot of code from src/tools/rustdoc-js/tester.js that tried to parse search.js and extract specific functions that were needed for testing.
2022-05-17Fix display of search crate filter selectGuillaume Gomez-7/+7
2022-05-17Fix duplicated "in" in the search result textGuillaume Gomez-1/+1
2022-05-15Add new eslint rule about brace styleGuillaume Gomez-33/+57
2022-05-15Reduce clean::Type size by replacing a DefId (only used to check for ↵Guillaume Gomez-5/+1
display) with a boolean
2022-05-14Remove theme picker buttonGuillaume Gomez-199/+12
2022-05-14Improve settings menu displayGuillaume Gomez-31/+110
2022-05-14Rollup merge of #96998 - notriddle:notriddle/var-N, r=jshaYuki Okushi-1/+1
rustdoc: remove weird, unused variable from source-files.js
2022-05-12rustdoc: remove weird, unused variable from source-files.jsMichael Howell-1/+1
2022-05-12rustdoc: fix GUI crash when searching for magic JS property valuesMichael Howell-2/+2
2022-05-12Auto merge of #96974 - matthiaskrgr:rollup-jd4otnc, r=matthiaskrgrbors-39/+5
Rollup of 5 pull requests Successful merges: - #95896 (Note the contacts for the nvptx64 target(s)) - #96860 (openbsd: convert futex timeout managment to Timespec usage) - #96939 (Fix settings page CSS) - #96941 (update graphviz links) - #96968 (Add tests for #96806) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-05-12Rollup merge of #96939 - GuillaumeGomez:settings-css, r=notriddleMatthias Krüger-39/+5
Fix settings page CSS In https://github.com/rust-lang/rust/pull/96741, I moved the CSS loading outside of `settings.js`. The result was that on the settings page, there isn't the settings CSS anymore: ![Screenshot from 2022-05-11 11-09-24](https://user-images.githubusercontent.com/3050060/167817969-6750931b-3e6e-4178-b5a9-ee3851e983be.png) I also used this opportunity to remove unused CSS rules (we don't have `<select>` elements anymore in the settings). cc `@jsha` r? `@notriddle`
2022-05-12Auto merge of #95562 - lcnr:attr-no-encode, r=davidtwcobors-1/+1
don't encode only locally used attrs Part of https://github.com/rust-lang/compiler-team/issues/505. We now filter builtin attributes before encoding them in the crate metadata in case they should only be used in the local crate. To prevent accidental misuse `get_attrs` now requires the caller to state which attribute they are interested in. For places where that isn't trivially possible, I've added a method `fn get_attrs_unchecked` which I intend to remove in a followup PR. After this pull request landed, we can then slowly move all attributes to only be used in the local crate while being certain that we don't accidentally try to access them from extern crates. cc https://github.com/rust-lang/rust/pull/94963#issuecomment-1082924289
2022-05-11Remove unused CSS settings rulesGuillaume Gomez-36/+0
2022-05-11Add missing CSS file for settings pageGuillaume Gomez-3/+5
2022-05-11Rollup merge of #96900 - GuillaumeGomez:fix-js-error, r=notriddleYuki Okushi-3/+1
Fix js error On the source code pages, we get a JS error: ![Screenshot from 2022-05-10 16-26-53](https://user-images.githubusercontent.com/3050060/167656292-51e0b0e9-6b0c-4f94-82e0-dd8fb77adf52.png) It's fixed in the first commit. The second one is removing an unused CSS rule and the third one is a little cleanup of a GUI test. cc ``@jsha`` r? ``@notriddle``
2022-05-11Rollup merge of #96879 - notriddle:notriddle/search-ranking, r=GuillaumeGomezYuki Okushi-1/+1
rustdoc: search result ranking fix # Before ![image](https://user-images.githubusercontent.com/1593513/167477286-91049761-67f9-4a73-8fb7-09dbb19ca76c.png) # After ![image](https://user-images.githubusercontent.com/1593513/167477345-6733bc0f-4bb2-4625-9f7f-094031e36414.png)
2022-05-10Remove unused CSS ruleGuillaume Gomez-1/+0
2022-05-10Fix JS error in source code pagesGuillaume Gomez-2/+1
2022-05-10update rustdoclcnr-1/+1
2022-05-09rustdoc: search result ranking fixMichael Howell-1/+1
2022-05-09Rollup merge of #96858 - notriddle:notriddle/cleanup-search-js, r=GuillaumeGomezMatthias Krüger-2/+2
Remove unused param from search.js::checkPath
2022-05-08Remove unused param from search.js::checkPathMichael Howell-2/+2
2022-05-09Auto merge of #95960 - jhpratt:remove-rustc_deprecated, r=compiler-errorsbors-2/+2
Remove `#[rustc_deprecated]` This removes `#[rustc_deprecated]` and introduces diagnostics to help users to the right direction (that being `#[deprecated]`). All uses of `#[rustc_deprecated]` have been converted. CI is expected to fail initially; this requires #95958, which includes converting `stdarch`. I plan on following up in a short while (maybe a bootstrap cycle?) removing the diagnostics, as they're only intended to be short-term.
2022-05-08Enforce no trailing spaces with eslintGuillaume Gomez-0/+1
2022-05-08Enforce linebreak style in js source codeGuillaume Gomez-0/+4
2022-05-07Enforce quote rule for JS source codeGuillaume Gomez-52/+56
2022-05-07Rollup merge of #96805 - Folyd:eslint, r=GuillaumeGomezGuillaume Gomez-30/+4
Change eslint rules from configuration comments to configuration file Repeatedly declaring eslint rules in source files is an annoying thing, we should move those rules into the eslint configuration file. r? ``@GuillaumeGomez``
2022-05-07Rollup merge of #96636 - GuillaumeGomez:fix-jump-to-def-regression, r=notriddleGuillaume Gomez-3/+1
Fix jump to def regression https://github.com/rust-lang/rust/pull/93803 introduced a regression in the "jump to def" feature. This fixes it. Nice side-effect: it adds a new regression test. :) I also used this opportunity to add documentation about this unstable feature in the rustdoc book. cc ``@cjgillot`` r? ``@notriddle``
2022-05-07Change eslint rules from configuration comments to configuration filesFolyd-30/+4
2022-05-06Remove unneeded SpanMapVisitor::visit_generics functionGuillaume Gomez-13/+1
2022-05-06Rollup merge of #96754 - notriddle:notriddle/impl-dups, r=GuillaumeGomezGuillaume Gomez-16/+103
rustdoc: ensure HTML/JS side implementors don't have dups Fixes #94641 Rendered: - https://notriddle.com/notriddle-rustdoc-test/impl-dups/std/iter/trait.Iterator.html - https://notriddle.com/notriddle-rustdoc-test/impl-dups/core/iter/trait.Iterator.html
2022-05-06Rollup merge of #96748 - GuillaumeGomez:reexports-in-search, r=notriddleGuillaume Gomez-2/+19
Fixes reexports in search Fixes #96681. At some point we stopped reexporting items in search so this PR fixes it. It also adds a regression test. r? ```@notriddle```
2022-05-06Rollup merge of #96590 - notriddle:notriddle/tab-bar-fn-search, ↵Guillaume Gomez-25/+49
r=GuillaumeGomez,jsha rustdoc: when running a function-signature search, tweak the tab bar # Before ![In Names (7) / In Parameters (0) / In Return types (0)](https://user-images.githubusercontent.com/1593513/166122875-ffdeafe6-8d4d-4e61-84a6-f5986b50ac35.png) # After ![In Function Signature (7)](https://user-images.githubusercontent.com/1593513/166122883-9a3d7515-3235-4ee3-8c4b-5401d109e099.png)
2022-05-06Fix reexports missing from the search indexGuillaume Gomez-2/+19
2022-05-05Rollup merge of #96741 - GuillaumeGomez:improve-settings-loading-strategy, ↵Michael Goulet-4/+4
r=jsha Improve settings loading strategy I learned about this thanks to ```@jsha``` who suggested this approach: It improves the settings loading strategy by loading CSS and JS at the same time to prevent the style to be applied afterwards on slow connections. r? ```@jsha```
2022-05-05Rollup merge of #96704 - GuillaumeGomez:rotation-animation, r=jshaMichael Goulet-0/+14
Add rotation animation on settings button when loading As discussed, I added an animation when the settings JS file is loading (I voluntarily made the timeout at the end of the `settings.js` super long so we can see what the animation looks like): https://user-images.githubusercontent.com/3050060/166693243-816a08b7-5e39-4142-acd3-686ad9950d8e.mp4 r? ````@jsha````
2022-05-05rustdoc: ensure HTML/JS side implementors don't have dupsMichael Howell-16/+103
2022-05-05Improve settings loading strategy by loading CSS and JS at the same time to ↵Guillaume Gomez-4/+4
prevent the style to be applied afterwards on slow connections
2022-05-05rustdoc: fix JS error when rendering parse errorMichael Howell-0/+4
2022-05-05rustdoc: fix keyboard shortcuts and console log on search pageMichael Howell-12/+24
2022-05-05rustdoc: change the "In Function Signatures" to context-sensitiveMichael Howell-1/+5
* If it's just `-> a`, use "In Function Return Types" * If it's just `a b`, use "In Function Parameters" * Otherwise, still use "In Function Signatures"
2022-05-05rustdoc: when running a function-signature search, tweak the tab barMichael Howell-13/+17
2022-05-05Add rotation animation on settings button when loadingGuillaume Gomez-1/+14