@@ -34,7 +34,7 @@ crate trait FormatRenderer<'tcx>: Sized {
3434 fn item ( & mut self , item : clean:: Item ) -> Result < ( ) , Error > ;
3535
3636 /// Renders a module (should not handle recursing into children).
37- fn mod_item_in ( & mut self , item : & clean:: Item , item_name : & str ) -> Result < ( ) , Error > ;
37+ fn mod_item_in ( & mut self , item : & clean:: Item ) -> Result < ( ) , Error > ;
3838
3939 /// Runs after recursively rendering all sub-items of a module.
4040 fn mod_item_out ( & mut self ) -> Result < ( ) , Error > {
@@ -73,13 +73,10 @@ crate fn run_format<'tcx, T: FormatRenderer<'tcx>>(
7373 if item. is_mod ( ) && T :: RUN_ON_MODULE {
7474 // modules are special because they add a namespace. We also need to
7575 // recurse into the items of the module as well.
76- let name = item. name . as_ref ( ) . unwrap ( ) . to_string ( ) ;
77- if name. is_empty ( ) {
78- panic ! ( "Unexpected module with empty name" ) ;
79- }
80- let _timer = prof. generic_activity_with_arg ( "render_mod_item" , name. as_str ( ) ) ;
76+ let _timer =
77+ prof. generic_activity_with_arg ( "render_mod_item" , item. name . unwrap ( ) . to_string ( ) ) ;
8178
82- cx. mod_item_in ( & item, & name ) ?;
79+ cx. mod_item_in ( & item) ?;
8380 let module = match * item. kind {
8481 clean:: StrippedItem ( box clean:: ModuleItem ( m) ) | clean:: ModuleItem ( m) => m,
8582 _ => unreachable ! ( ) ,
0 commit comments