Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/librustdoc/html/render/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,13 @@ impl<'tcx> Context<'tcx> {
"../".repeat(self.current.len())
}

fn render_item(&self, it: &clean::Item, pushname: bool) -> String {
fn render_item(&self, it: &clean::Item, is_module: bool) -> String {
let mut title = String::new();
if pushname {
if is_module {
title.push_str(&it.name.unwrap().as_str());
}
if !it.is_primitive() && !it.is_keyword() {
if pushname {
if is_module {
title.push_str(" in ");
}
// No need to include the namespace for primitive types and keywords
Expand Down
1 change: 1 addition & 0 deletions src/test/rustdoc/item-title.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ pub struct Widget;
// @has foo/constant.ANSWER.html '//head/title' 'ANSWER in foo - Rust'
pub const ANSWER: u8 = 42;

// @has foo/blah/index.html '//head/title' 'foo::blah - Rust'
pub mod blah {
// @has foo/blah/struct.Widget.html '//head/title' 'Widget in foo::blah - Rust'
pub struct Widget;
Expand Down
12 changes: 0 additions & 12 deletions src/test/rustdoc/mod-title.rs

This file was deleted.