Skip to content

Rollup of 8 pull requests #96753

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

Closed
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
7907385
fix most compiler/ doctests
Elliot-Roberts Apr 15, 2022
e626634
Collect function instance used in `global_asm!` sym operand
tmiasko May 2, 2022
13b45aa
Add rotation animation on settings button when loading
GuillaumeGomez May 4, 2022
cb131d2
Add a regression test for #64173 and #66152
JohnTitor May 5, 2022
6c8a2d4
rustdoc: when running a function-signature search, tweak the tab bar
notriddle Apr 30, 2022
345a580
Use STARTS_WITH, since it's more specific
notriddle May 1, 2022
21a1213
rustdoc: change the "In Function Signatures" to context-sensitive
notriddle May 2, 2022
8b2147b
rustdoc: fix keyboard shortcuts and console log on search page
notriddle May 2, 2022
75790fa
rustdoc: add test case assertions for ArrowDown highlight first result
notriddle May 3, 2022
4c183cd
rustdoc: fix JS error when rendering parse error
notriddle May 3, 2022
87b6326
Improve settings loading strategy by loading CSS and JS at the same t…
GuillaumeGomez May 5, 2022
2ed38cd
Add `track_caller` to `DefId::expect_local()`
JohnTitor May 5, 2022
30309db
Put the 2229 migration errors in alphabetical order
scottmcm May 4, 2022
7a983ad
Rollup merge of #96094 - Elliot-Roberts:fix_doctests, r=compiler-errors
compiler-errors May 6, 2022
f32a3d6
Rollup merge of #96590 - notriddle:notriddle/tab-bar-fn-search, r=Gui…
compiler-errors May 6, 2022
149ab39
Rollup merge of #96650 - tmiasko:global-asm-sym-fn, r=Amanieu
compiler-errors May 6, 2022
0631930
Rollup merge of #96704 - GuillaumeGomez:rotation-animation, r=jsha
compiler-errors May 6, 2022
3cda519
Rollup merge of #96730 - JohnTitor:unused-lifetimes-tests, r=compiler…
compiler-errors May 6, 2022
c5abe2d
Rollup merge of #96741 - GuillaumeGomez:improve-settings-loading-stra…
compiler-errors May 6, 2022
5a2fbcf
Rollup merge of #96747 - JohnTitor:expect-local-track-caller, r=compi…
compiler-errors May 6, 2022
3fd498a
Rollup merge of #96752 - scottmcm:error-sorting, r=compiler-errors
compiler-errors May 6, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Improve settings loading strategy by loading CSS and JS at the same t…
…ime to prevent the style to be applied afterwards on slow connections
  • Loading branch information
GuillaumeGomez committed May 5, 2022
commit 87b6326d672f5d40b14460bdedebf4f69288fb6a
3 changes: 3 additions & 0 deletions src/librustdoc/html/static/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,9 @@ function loadCss(cssFileName) {

getSettingsButton().onclick = event => {
event.preventDefault();
// Sending request for the CSS and the JS files at the same time so it will
// hopefully be loaded when the JS will generate the settings content.
loadCss("settings");
loadScript(window.settingsJS);
};

Expand Down
5 changes: 1 addition & 4 deletions src/librustdoc/html/static/js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/* eslint prefer-const: "error" */
/* eslint prefer-arrow-callback: "error" */
// Local js definitions:
/* global getSettingValue, getVirtualKey, updateLocalStorage, updateSystemTheme, loadCss */
/* global getSettingValue, getVirtualKey, updateLocalStorage, updateSystemTheme */
/* global addClass, removeClass, onEach, onEachLazy, NOT_DISPLAYED_ID */
/* global MAIN_ID, getVar, getSettingsButton, switchDisplayedElement, getNotDisplayedElem */

Expand Down Expand Up @@ -207,9 +207,6 @@
},
];

// First, we add the settings.css file.
loadCss("settings");

// Then we build the DOM.
const el = document.createElement("section");
el.id = "settings";
Expand Down