File tree 2 files changed +17
-3
lines changed
src/librustdoc/html/static/js
2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -676,7 +676,6 @@ function preLoadCss(cssUrl) {
676
676
}
677
677
678
678
// <https://github.com/search?q=repo%3Arust-lang%2Frust+[RUSTDOCIMPL]+trait.impl&type=code>
679
- // @ts -expect-error
680
679
window . register_implementors = imp => {
681
680
const implementors = document . getElementById ( "implementors-list" ) ;
682
681
const synthetic_implementors = document . getElementById ( "synthetic-implementors-list" ) ;
@@ -768,9 +767,7 @@ function preLoadCss(cssUrl) {
768
767
}
769
768
}
770
769
} ;
771
- // @ts -expect-error
772
770
if ( window . pending_implementors ) {
773
- // @ts -expect-error
774
771
window . register_implementors ( window . pending_implementors ) ;
775
772
}
776
773
Original file line number Diff line number Diff line change @@ -44,6 +44,15 @@ declare global {
44
44
* Set up event listeners for a scraped source example.
45
45
*/
46
46
updateScrapedExample ?: function ( HTMLElement , HTMLElement ) ,
47
+ /**
48
+ * register trait implementors, called by code generated in
49
+ * `write_shared.rs`
50
+ */
51
+ register_implementors ?: function ( Implementors ) : void ,
52
+ /**
53
+ * fallback in case `register_implementors` isn't defined yet.
54
+ */
55
+ pending_implementors ?: Implementors ,
47
56
}
48
57
interface HTMLElement {
49
58
/** Used by the popover tooltip code. */
@@ -415,4 +424,12 @@ declare namespace rustdoc {
415
424
} ;
416
425
417
426
type VlqData = VlqData [ ] | number ;
427
+
428
+ /**
429
+ * Maps from crate names to trait implementation data.
430
+ * Provied by generated `trait.impl` files.
431
+ */
432
+ type Implementors = {
433
+ [ key : string ] : Array < [ string , number , Array < string > ] >
434
+ }
418
435
}
You can’t perform that action at this time.
0 commit comments