-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 8 pull requests #82756
Rollup of 8 pull requests #82756
Commits on Feb 26, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 2f04a79 - Browse repository at this point
Copy the full SHA 2f04a79View commit details
Commits on Mar 2, 2021
-
Rename rustdoc lints to be a tool lint instead of built-in.
- Rename `broken_intra_doc_links` to `rustdoc::broken_intra_doc_links` - Ensure that the old lint names still work and give deprecation errors - Register lints even when running doctests Otherwise, all `rustdoc::` lints would be ignored. - Register all existing lints as removed This unfortunately doesn't work with `register_renamed` because tool lints have not yet been registered when rustc is running. For similar reasons, `check_backwards_compat` doesn't work either. Call `register_removed` directly instead. - Fix fallout + Rustdoc lints for compiler/ + Rustdoc lints for library/ Note that this does *not* suggest `rustdoc::broken_intra_doc_links` for `rustdoc::intra_doc_link_resolution_failure`, since there was no time when the latter was valid.
Configuration menu - View commit details
-
Copy full SHA for cc62018 - Browse repository at this point
Copy the full SHA cc62018View commit details -
Configuration menu - View commit details
-
Copy full SHA for 37e4cfe - Browse repository at this point
Copy the full SHA 37e4cfeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7195355 - Browse repository at this point
Copy the full SHA 7195355View commit details -
- Use `register_renamed` when rustdoc is running so the lint will still be active and use a structured suggestion - Test the behavior for rustc, not just for rustdoc (because it differs)
Configuration menu - View commit details
-
Copy full SHA for e8ddfda - Browse repository at this point
Copy the full SHA e8ddfdaView commit details -
- Move MISSING_CRATE_LEVEL_DOCS to rustdoc directly - Update documentation This also takes the opportunity to make the `no-crate-level-doc-lint` test more specific.
Configuration menu - View commit details
-
Copy full SHA for 0517ea7 - Browse repository at this point
Copy the full SHA 0517ea7View commit details -
Note that the FIXME was removed because this can't be fixed, `register_renamed` calls LintId::of and there's no LintId for rustdoc lints when rustc is running.
Configuration menu - View commit details
-
Copy full SHA for c7535d1 - Browse repository at this point
Copy the full SHA c7535d1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 75efb6e - Browse repository at this point
Copy the full SHA 75efb6eView commit details -
Configuration menu - View commit details
-
Copy full SHA for c194849 - Browse repository at this point
Copy the full SHA c194849View commit details -
Load rustdoc's JS search index on-demand.
Instead of being loaded on every page, the JS search index is now loaded when either (a) there is a `?search=` param, or (b) the search input is focused. This saves both CPU and bandwidth. As of Feb 2021, https://doc.rust-lang.org/search-index1.50.0.js is 273,838 bytes gzipped or 2,544,939 bytes uncompressed. Evaluating it takes 445 ms of CPU time in Chrome 88 on a i7-10710U CPU (out of a total ~2,100 ms page reload). Generate separate JS file with crate names. This is much smaller than the full search index, and is used in the "hot path" to draw the page. In particular it's used to crate the dropdown for the search bar, and to append a list of crates to the sidebar (on some pages). Skip early search that can bypass 500ms timeout. This was occurring when someone had typed some text during the load of search-index.js. Their query was usually not ready to execute, and the search itself is fairly expensive, delaying the overall load, which delayed the input / keyup events, which delayed eventually executing the query.
Configuration menu - View commit details
-
Copy full SHA for 768d5e9 - Browse repository at this point
Copy the full SHA 768d5e9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9c4e3af - Browse repository at this point
Copy the full SHA 9c4e3afView commit details -
Configuration menu - View commit details
-
Copy full SHA for a1835bc - Browse repository at this point
Copy the full SHA a1835bcView commit details
Commits on Mar 3, 2021
-
Improve page load performance in rustdoc.
Add font-display: swap. Per https://web.dev/font-display/, this prevents "flash of invisible text" during load by using a system font until the custom font is available. I've noticed this flash of invisible text occasionally when reading Rust docs. Add an explicit height to icons (which already had an explicit width) to allow browsers to lay out the page more accurately before the icons have been loaded. https://web.dev/optimize-cls/. Add min-width: 115px to the crate search dropdown. When the HTML first loads, this dropdown includes only the text "All crates." Later, JS loads the items underneath it, some of which are wider. That causes the dropdown to get wider, causing a distracting reflow. This sets a min-width based on the size that the dropdown eventually becomes based on the crates on doc.rust-lang.org, reducing page movement during load.
Configuration menu - View commit details
-
Copy full SHA for d3e7ffa - Browse repository at this point
Copy the full SHA d3e7ffaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5824917 - Browse repository at this point
Copy the full SHA 5824917View commit details -
Use Arial as fallback font instead of sans-serif.
On most platforms and browsers, `sans-serif` is equivalent to Arial. However, on Firefox on Ubuntu (and possibly other Linuxes), `sans-serif` is DejaVu Sans, a much wider font. This creates a larger shift in text when the custom fonts finally load. Arial is a web-safe font, and specifying it explicitly gives us more cross-platform consistency, as well as reducing the layout shift that happens when fonts load.
Configuration menu - View commit details
-
Copy full SHA for f9cfe15 - Browse repository at this point
Copy the full SHA f9cfe15View commit details -
Update library/alloc/src/vec/mod.rs
Co-authored-by: Ralf Jung <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 950f121 - Browse repository at this point
Copy the full SHA 950f121View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5d0697b - Browse repository at this point
Copy the full SHA 5d0697bView commit details
Commits on Mar 4, 2021
-
Fix commit detected when using
download-rustc
On reflection on the issue in rust-lang#79540 (comment), I think the bug was actually using the `compiler/` filter, not using `--author=bors`. rust-lang@9a1d617 has no CI artifacts because it was merged as part of a rollup: ``` $ curl -I https://ci-artifacts.rust-lang.org/rustc-builds/96e843ce6ae42e0aa519ba45e148269de347fd84/rust-std-nightly-x86_64-unknown-linux-gnu.tar.xz HTTP/2 404 ``` So 9a1d617 is the correct commit to download, and that's what `--author=bors` does: $ git log --author=bors 4aec8a5 commit 9a1d617 Ideally it would look for "the most recent bors commit not followed by a change to `compiler/`", which would exclude things like documentation changes and avoid redownloading more than necessary, but - Redownloading isn't the end of the world, - That metric is hard to implement, and - Documentation-only or library-only changes are very rare anyway since they're usually rolled up with changes to the compiler.
Configuration menu - View commit details
-
Copy full SHA for a705a58 - Browse repository at this point
Copy the full SHA a705a58View commit details -
Pass
CrateNum
by value instead of by referenceIt's more idiomatic to pass a small Copy type by value and `CrateNum` is half the size of `&CrateNum` on 64-bit systems. The memory use change is almost certainly insignificant, but why not!
Configuration menu - View commit details
-
Copy full SHA for c79af86 - Browse repository at this point
Copy the full SHA c79af86View commit details -
Rollup merge of rust-lang#80527 - jyn514:rustdoc-lints, r=GuillaumeGomez
Make rustdoc lints a tool lint instead of built-in - Rename `broken_intra_doc_links` to `rustdoc::broken_intra_doc_links` (and similar for other rustdoc lints; I don't expect any others to be used frequently, though). - Ensure that the old lint names still work and give deprecation errors - Register lints even when running doctests - Move lint machinery into a separate file - Add `declare_rustdoc_lint!` macro Unblocks rust-lang#80300, rust-lang#79816, rust-lang#80965. Makes the strangeness in rust-lang#77364 more apparent to the end user (note that `missing_docs` is *not* moved to rustdoc in this PR). Closes rust-lang#78786. ## Current status This is blocked on rust-lang#82620 (see rust-lang#80527 (comment))
Configuration menu - View commit details
-
Copy full SHA for f898aa3 - Browse repository at this point
Copy the full SHA f898aa3View commit details -
Rollup merge of rust-lang#82310 - jsha:rustdoc-search-onfocus, r=Guil…
…laumeGomez Load rustdoc's JS search index on-demand. Instead of being loaded on every page, the JS search index is now loaded when either (a) there is a `?search=` param, or (b) the search input is focused. This saves both CPU and bandwidth. As of Feb 2021, https://doc.rust-lang.org/search-index1.50.0.js is 273,838 bytes gzipped or 2,544,939 bytes uncompressed. Evaluating it takes 445 ms of CPU time in Chrome 88 on a i7-10710U CPU (out of a total ~2,100 ms page reload). Tested on Firefox and Chrome. New: https://jacob.hoffman-andrews.com/rust/search-on-demand/std/primitive.slice.html https://jacob.hoffman-andrews.com/rust/search-on-demand/std/primitive.slice.html?search=fn Old: https://jacob.hoffman-andrews.com/rust/search-on-load/std/primitive.slice.html https://jacob.hoffman-andrews.com/rust/search-on-load/std/primitive.slice.html?search=fn
Configuration menu - View commit details
-
Copy full SHA for 36b7bef - Browse repository at this point
Copy the full SHA 36b7befView commit details -
Rollup merge of rust-lang#82315 - jsha:font-display-swap, r=Guillaume…
…Gomez Improve page load performance in rustdoc Add an explicit height to icons (which already had an explicit width) to allow browsers to lay out the page more accurately before the icons have been loaded. https://web.dev/optimize-cls/. Add min-width: 115px to the crate search dropdown. When the HTML first loads, this dropdown includes only the text "All crates." Later, JS loads the items underneath it, some of which are wider. That causes the dropdown to get wider, causing a distracting reflow. This sets a min-width based on the size that the dropdown eventually becomes based on the crates on doc.rust-lang.org, reducing page movement during load. Add font-display: swap. Per https://web.dev/font-display/, this prevents "flash of invisible text" during load by using a system font until the custom font is available. I've noticed this flash of invisible text occasionally when reading Rust docs. Note that users without cached fonts will see text, and then see it reflow. For `docs.rust-lang.org`, [setting caching headers will help a lot](rust-lang/simpleinfra#62). Generated output at https://jacob.hoffman-andrews.com/rust/flow-improvements/std/string/struct.String.html.
Configuration menu - View commit details
-
Copy full SHA for 569f033 - Browse repository at this point
Copy the full SHA 569f033View commit details -
Rollup merge of rust-lang#82564 - WaffleLapkin:revert_spare_mut, r=Ra…
…lfJung Revert `Vec::spare_capacity_mut` impl to prevent pointers invalidation The implementation was changed in rust-lang#79015. Later it was [pointed out](rust-lang#81944 (comment)) that the implementation invalidates pointers to the buffer (initialized elements) by creating a unique reference to the buffer. This PR reverts the implementation. r? ```@RalfJung```
Configuration menu - View commit details
-
Copy full SHA for 290117f - Browse repository at this point
Copy the full SHA 290117fView commit details -
Rollup merge of rust-lang#82697 - jplatte:patch-1, r=davidtwco
Fix stabilization version of move_ref_pattern Both the [changelog](https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1490-2020-12-31) and the milestone of the [stabilization PR](rust-lang#76119) say 1.49.0, but the source says 1.48.0. I think the former is correct.
Configuration menu - View commit details
-
Copy full SHA for 761ceab - Browse repository at this point
Copy the full SHA 761ceabView commit details -
Rollup merge of rust-lang#82717 - estebank:issue-70152, r=lcnr
Account for macros when suggesting adding lifetime Fix rust-lang#70152.
Configuration menu - View commit details
-
Copy full SHA for c398871 - Browse repository at this point
Copy the full SHA c398871View commit details -
Rollup merge of rust-lang#82740 - jyn514:proper-history, r=Mark-Simul…
…acrum Fix commit detected when using `download-rustc` On reflection on the issue in rust-lang#79540 (comment), I think the bug was actually using the `compiler/` filter, not using `--author=bors`. rust-lang@9a1d617 has no CI artifacts because it was merged as part of a rollup: ``` $ curl -I https://ci-artifacts.rust-lang.org/rustc-builds/96e843ce6ae42e0aa519ba45e148269de347fd84/rust-std-nightly-x86_64-unknown-linux-gnu.tar.xz HTTP/2 404 ``` So 9a1d617 is the correct commit to download, and that's what `--author=bors` does: $ git log --author=bors 4aec8a5 commit 9a1d617 Ideally it would look for "the most recent bors commit not followed by a change to `compiler/`", which would exclude things like documentation changes and avoid redownloading more than necessary, but - Redownloading isn't the end of the world, - That metric is hard to implement, and - Documentation-only or library-only changes are very rare anyway since they're usually rolled up with changes to the compiler. Helps with rust-lang#81930. r? `@Mark-Simulacrum`
Configuration menu - View commit details
-
Copy full SHA for 17121f2 - Browse repository at this point
Copy the full SHA 17121f2View commit details -
Rollup merge of rust-lang#82744 - camelid:cratenum-byval, r=Guillaume…
…Gomez Pass `CrateNum` by value instead of by reference It's more idiomatic to pass a small Copy type by value and `CrateNum` is half the size of `&CrateNum` on 64-bit systems. The memory use change is almost certainly insignificant, but why not!
Configuration menu - View commit details
-
Copy full SHA for 06630f7 - Browse repository at this point
Copy the full SHA 06630f7View commit details