Skip to content

Commit 05121a2

Browse files
committed
fix is_module check
1 parent a9ff7ac commit 05121a2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/librustdoc/html/render/context.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,11 @@ impl<'tcx> Context<'tcx> {
169169

170170
fn render_item(&self, it: &clean::Item, is_module: bool) -> String {
171171
let mut title = String::new();
172-
if is_module {
172+
if !is_module {
173173
title.push_str(&it.name.unwrap().as_str());
174174
}
175175
if !it.is_primitive() && !it.is_keyword() {
176-
if is_module {
176+
if !is_module {
177177
title.push_str(" in ");
178178
}
179179
// No need to include the namespace for primitive types and keywords
@@ -597,7 +597,7 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
597597

598598
info!("Recursing into {}", self.dst.display());
599599

600-
let buf = self.render_item(item, false);
600+
let buf = self.render_item(item, true);
601601
// buf will be empty if the module is stripped and there is no redirect for it
602602
if !buf.is_empty() {
603603
self.shared.ensure_dir(&self.dst)?;
@@ -640,7 +640,7 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
640640
self.render_redirect_pages = item.is_stripped();
641641
}
642642

643-
let buf = self.render_item(&item, true);
643+
let buf = self.render_item(&item, false);
644644
// buf will be empty if the item is stripped and there is no redirect for it
645645
if !buf.is_empty() {
646646
let name = item.name.as_ref().unwrap();

0 commit comments

Comments
 (0)