Skip to content

Commit 7f6d540

Browse files
committed
Remove unnecessary item_name parameter to mod_item_out
1 parent 423963c commit 7f6d540

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

src/librustdoc/formats/renderer.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ crate trait FormatRenderer<'tcx>: Sized {
3737
fn mod_item_in(&mut self, item: &clean::Item, item_name: &str) -> Result<(), Error>;
3838

3939
/// Runs after recursively rendering all sub-items of a module.
40-
fn mod_item_out(&mut self, item_name: &str) -> Result<(), Error>;
40+
fn mod_item_out(&mut self) -> Result<(), Error> {
41+
Ok(())
42+
}
4143

4244
/// Post processing hook for cleanup and dumping output to files.
4345
fn after_krate(&mut self) -> Result<(), Error>;
@@ -87,7 +89,7 @@ crate fn run_format<'tcx, T: FormatRenderer<'tcx>>(
8789
work.push((cx.make_child_renderer(), it));
8890
}
8991

90-
cx.mod_item_out(&name)?;
92+
cx.mod_item_out()?;
9193
// FIXME: checking `item.name.is_some()` is very implicit and leads to lots of special
9294
// cases. Use an explicit match instead.
9395
} else if item.name.is_some() && !item.is_extern_crate() {

src/librustdoc/html/render/context.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
617617
Ok(())
618618
}
619619

620-
fn mod_item_out(&mut self, _item_name: &str) -> Result<(), Error> {
620+
fn mod_item_out(&mut self) -> Result<(), Error> {
621621
info!("Recursed; leaving {}", self.dst.display());
622622

623623
// Go back to where we were at

src/librustdoc/json/mod.rs

-4
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,6 @@ impl<'tcx> FormatRenderer<'tcx> for JsonRenderer<'tcx> {
198198
Ok(())
199199
}
200200

201-
fn mod_item_out(&mut self, _item_name: &str) -> Result<(), Error> {
202-
Ok(())
203-
}
204-
205201
fn after_krate(&mut self) -> Result<(), Error> {
206202
debug!("Done with crate");
207203
let mut index = (*self.index).clone().into_inner();

0 commit comments

Comments
 (0)