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 @@ -800,16 +800,14 @@ function preLoadCss(cssUrl) {
800
800
*
801
801
* - After processing all of the impls, it sorts the sidebar items by name.
802
802
*
803
- * @param {{[cratename: string]: Array<Array<string|0>>} } imp
803
+ * @param {rustdoc.TypeImpls } imp
804
804
*/
805
- // @ts -expect-error
806
805
window . register_type_impls = imp => {
807
806
// @ts -expect-error
808
807
if ( ! imp || ! imp [ window . currentCrate ] ) {
809
808
return ;
810
809
}
811
- // @ts -expect-error
812
- window . pending_type_impls = null ;
810
+ window . pending_type_impls = undefined ;
813
811
const idMap = new Map ( ) ;
814
812
815
813
let implementations = document . getElementById ( "implementations-list" ) ;
@@ -995,9 +993,7 @@ function preLoadCss(cssUrl) {
995
993
list . replaceChildren ( ...newChildren ) ;
996
994
}
997
995
} ;
998
- // @ts -expect-error
999
996
if ( window . pending_type_impls ) {
1000
- // @ts -expect-error
1001
997
window . register_type_impls ( window . pending_type_impls ) ;
1002
998
}
1003
999
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