Mark top level module as a crate in rustdoc, closes #12507

This commit is contained in:
Florian Hahn
2014-02-28 22:33:45 +01:00
parent 68a92c5ed5
commit 5d825def29
5 changed files with 14 additions and 2 deletions

View File

@@ -863,7 +863,11 @@ impl<'a> fmt::Show for Item<'a> {
// Write the breadcrumb trail header for the top
try!(write!(fmt.buf, "<h1 class='fqn'>"));
match self.item.inner {
clean::ModuleItem(..) => try!(write!(fmt.buf, "Module ")),
clean::ModuleItem(ref m) => if m.is_crate {
try!(write!(fmt.buf, "Crate "));
} else {
try!(write!(fmt.buf, "Module "));
},
clean::FunctionItem(..) => try!(write!(fmt.buf, "Function ")),
clean::TraitItem(..) => try!(write!(fmt.buf, "Trait ")),
clean::StructItem(..) => try!(write!(fmt.buf, "Struct ")),