We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ab180c2 commit 2e1c8f0Copy full SHA for 2e1c8f0
src/librustdoc/html/static/js/main.js
@@ -585,7 +585,6 @@ function preLoadCss(cssUrl) {
585
document.addEventListener("keydown", handleShortcut);
586
587
function addSidebarItems() {
588
- // @ts-expect-error
589
if (!window.SIDEBAR_ITEMS) {
590
return;
591
}
src/librustdoc/html/static/js/rustdoc.d.ts
@@ -7,6 +7,8 @@ declare global {
7
interface Window {
8
/** Make the current theme easy to find */
9
currentTheme: HTMLLinkElement|null;
10
+ /** Generated in `render/context.rs` */
11
+ SIDEBAR_ITEMS?: { [key: string]: string[] };
12
/** Used by the popover tooltip code. */
13
RUSTDOC_TOOLTIP_HOVER_MS: number;
14
0 commit comments