File tree 2 files changed +10
-8
lines changed
src/librustdoc/html/static/js
2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -797,16 +797,14 @@ function preLoadCss(cssUrl) {
797
797
*
798
798
* - After processing all of the impls, it sorts the sidebar items by name.
799
799
*
800
- * @param {{[cratename: string]: Array<Array<string|0>>} } imp
800
+ * @param {rustdoc.TypeImpls } imp
801
801
*/
802
- // @ts -expect-error
803
802
window . register_type_impls = imp => {
804
803
// @ts -expect-error
805
804
if ( ! imp || ! imp [ window . currentCrate ] ) {
806
805
return ;
807
806
}
808
- // @ts -expect-error
809
- window . pending_type_impls = null ;
807
+ window . pending_type_impls = undefined ;
810
808
const idMap = new Map ( ) ;
811
809
812
810
let implementations = document . getElementById ( "implementations-list" ) ;
@@ -992,9 +990,7 @@ function preLoadCss(cssUrl) {
992
990
list . replaceChildren ( ...newChildren ) ;
993
991
}
994
992
} ;
995
- // @ts -expect-error
996
993
if ( window . pending_type_impls ) {
997
- // @ts -expect-error
998
994
window . register_type_impls ( window . pending_type_impls ) ;
999
995
}
1000
996
Original file line number Diff line number Diff line change @@ -48,11 +48,13 @@ declare global {
48
48
* register trait implementors, called by code generated in
49
49
* `write_shared.rs`
50
50
*/
51
- register_implementors ?: function ( Implementors ) : void ,
51
+ register_implementors ?: function ( rustdoc . Implementors ) : void ,
52
52
/**
53
53
* fallback in case `register_implementors` isn't defined yet.
54
54
*/
55
- pending_implementors ?: Implementors ,
55
+ pending_implementors ?: rustdoc . Implementors ,
56
+ register_type_impls ?: function ( rustdoc . TypeImpls ) : void ,
57
+ pending_type_impls ?: rustdoc . TypeImpls ,
56
58
}
57
59
interface HTMLElement {
58
60
/** Used by the popover tooltip code. */
@@ -432,4 +434,8 @@ declare namespace rustdoc {
432
434
type Implementors = {
433
435
[ key : string ] : Array < [ string , number , Array < string > ] >
434
436
}
437
+
438
+ type TypeImpls = {
439
+ [ cratename : string ] : Array < Array < string | 0 > >
440
+ }
435
441
}
You can’t perform that action at this time.
0 commit comments