Commit 96df494
committed
Auto merge of rust-lang#118961 - notriddle:notriddle/varconst, r=GuillaumeGomez
rustdoc-search: fix a race condition in search index loading
`var` declare it in the global scope, and `const` does not. It needs to be declared in global scope.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/var
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const
> const declarations do not create properties on [globalThis](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis) when declared at the top level of a script.
Fixes a regression introduced by rust-lang#118910File tree
1 file changed
+8
-2
lines changed- src/librustdoc/html/render
1 file changed
+8
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
300 | | - | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
301 | 304 | | |
302 | 305 | | |
303 | 306 | | |
| |||
317 | 320 | | |
318 | 321 | | |
319 | 322 | | |
320 | | - | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
321 | 327 | | |
322 | 328 | | |
323 | 329 | | |
| |||
0 commit comments