@@ -21,14 +21,14 @@ pub(crate) trait FormatRenderer<'tcx>: Sized {
21
21
///
22
22
/// For each module, we go through their items by calling for each item:
23
23
///
24
- /// 1. make_child_renderer
24
+ /// 1. save_module_data
25
25
/// 2. item
26
26
/// 3. set_back_info
27
27
///
28
28
/// However,the `item` method might update information in `self` (for example if the child is
29
29
/// a module). To prevent it to impact the other children of the current module, we need to
30
30
/// reset the information between each call to `item` by using `set_back_info`.
31
- type InfoType ;
31
+ type ModuleData ;
32
32
33
33
/// Sets up any state required for the renderer. When this is called the cache has already been
34
34
/// populated.
@@ -46,13 +46,13 @@ pub(crate) trait FormatRenderer<'tcx>: Sized {
46
46
/// In short it goes like this:
47
47
///
48
48
/// ```ignore (not valid code)
49
- /// let reset_data = type.make_child_renderer ();
49
+ /// let reset_data = type.save_module_data ();
50
50
/// type.item(item)?;
51
51
/// type.set_back_info(reset_data);
52
52
/// ```
53
- fn make_child_renderer ( & mut self ) -> Self :: InfoType ;
53
+ fn save_module_data ( & mut self ) -> Self :: ModuleData ;
54
54
/// Used to reset current module's information.
55
- fn set_back_info ( & mut self , info : Self :: InfoType ) ;
55
+ fn set_back_info ( & mut self , info : Self :: ModuleData ) ;
56
56
57
57
/// Renders a single non-module item. This means no recursive sub-item rendering is required.
58
58
fn item ( & mut self , item : clean:: Item ) -> Result < ( ) , Error > ;
@@ -89,7 +89,7 @@ fn run_format_inner<'tcx, T: FormatRenderer<'tcx>>(
89
89
unreachable ! ( )
90
90
} ;
91
91
for it in module. items {
92
- let info = cx. make_child_renderer ( ) ;
92
+ let info = cx. save_module_data ( ) ;
93
93
run_format_inner ( cx, it, prof) ?;
94
94
cx. set_back_info ( info) ;
95
95
}
0 commit comments