@@ -455,10 +455,10 @@ pub(super) fn write_shared(
455455 let dst = cx. dst . join ( & format ! ( "source-files{}.js" , cx. shared. resource_suffix) ) ;
456456 let make_sources = || {
457457 let ( mut all_sources, _krates) =
458- try_err ! ( collect( & dst, & krate. name. as_str( ) , "sourcesIndex" ) , & dst) ;
458+ try_err ! ( collect( & dst, & krate. name( cx . tcx ( ) ) . as_str( ) , "sourcesIndex" ) , & dst) ;
459459 all_sources. push ( format ! (
460460 "sourcesIndex[\" {}\" ] = {};" ,
461- & krate. name,
461+ & krate. name( cx . tcx ( ) ) ,
462462 hierarchy. to_json_string( )
463463 ) ) ;
464464 all_sources. sort ( ) ;
@@ -473,9 +473,10 @@ pub(super) fn write_shared(
473473
474474 // Update the search index and crate list.
475475 let dst = cx. dst . join ( & format ! ( "search-index{}.js" , cx. shared. resource_suffix) ) ;
476- let ( mut all_indexes, mut krates) = try_err ! ( collect_json( & dst, & krate. name. as_str( ) ) , & dst) ;
476+ let ( mut all_indexes, mut krates) =
477+ try_err ! ( collect_json( & dst, & krate. name( cx. tcx( ) ) . as_str( ) ) , & dst) ;
477478 all_indexes. push ( search_index) ;
478- krates. push ( krate. name . to_string ( ) ) ;
479+ krates. push ( krate. name ( cx . tcx ( ) ) . to_string ( ) ) ;
479480 krates. sort ( ) ;
480481
481482 // Sort the indexes by crate so the file will be generated identically even
@@ -599,7 +600,7 @@ pub(super) fn write_shared(
599600
600601 let implementors = format ! (
601602 r#"implementors["{}"] = {};"# ,
602- krate. name,
603+ krate. name( cx . tcx ( ) ) ,
603604 serde_json:: to_string( & implementors) . unwrap( )
604605 ) ;
605606
@@ -611,7 +612,7 @@ pub(super) fn write_shared(
611612 mydst. push ( & format ! ( "{}.{}.js" , remote_item_type, remote_path[ remote_path. len( ) - 1 ] ) ) ;
612613
613614 let ( mut all_implementors, _) =
614- try_err ! ( collect( & mydst, & krate. name. as_str( ) , "implementors" ) , & mydst) ;
615+ try_err ! ( collect( & mydst, & krate. name( cx . tcx ( ) ) . as_str( ) , "implementors" ) , & mydst) ;
615616 all_implementors. push ( implementors) ;
616617 // Sort the implementors by crate so the file will be generated
617618 // identically even with rustdoc running in parallel.
0 commit comments