diff options
| author | Smitty <me@smitop.com> | 2021-04-20 19:10:00 -0400 |
|---|---|---|
| committer | Smitty <me@smitop.com> | 2021-04-20 19:10:00 -0400 |
| commit | 05121a22e61c02933ea1c619e4126b4dafe2a2d1 (patch) | |
| tree | 85e3ef8c4f76bce8a793c3c21b6dc34dff4c7449 /src/librustdoc/html/render | |
| parent | a9ff7ac9c3e583e7723722319d48caf35bdc0efb (diff) | |
| download | rust-05121a22e61c02933ea1c619e4126b4dafe2a2d1.tar.gz rust-05121a22e61c02933ea1c619e4126b4dafe2a2d1.zip | |
fix is_module check
Diffstat (limited to 'src/librustdoc/html/render')
| -rw-r--r-- | src/librustdoc/html/render/context.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/librustdoc/html/render/context.rs b/src/librustdoc/html/render/context.rs index 397e03afae6..0aa7aa763c2 100644 --- a/src/librustdoc/html/render/context.rs +++ b/src/librustdoc/html/render/context.rs @@ -169,11 +169,11 @@ impl<'tcx> Context<'tcx> { fn render_item(&self, it: &clean::Item, is_module: bool) -> String { let mut title = String::new(); - if is_module { + if !is_module { title.push_str(&it.name.unwrap().as_str()); } if !it.is_primitive() && !it.is_keyword() { - if is_module { + if !is_module { title.push_str(" in "); } // No need to include the namespace for primitive types and keywords @@ -597,7 +597,7 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> { info!("Recursing into {}", self.dst.display()); - let buf = self.render_item(item, false); + let buf = self.render_item(item, true); // buf will be empty if the module is stripped and there is no redirect for it if !buf.is_empty() { self.shared.ensure_dir(&self.dst)?; @@ -640,7 +640,7 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> { self.render_redirect_pages = item.is_stripped(); } - let buf = self.render_item(&item, true); + let buf = self.render_item(&item, false); // buf will be empty if the item is stripped and there is no redirect for it if !buf.is_empty() { let name = item.name.as_ref().unwrap(); |
