auto merge of #12632 : fhahn/rust/issue-12507-rustdoc-std-module, r=alexcrichton

This PR for #12507 marks the top level `Module` in rustdoc as a crate and does render the header accordingly.
This commit is contained in:
bors
2014-02-28 19:01:38 -08:00
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 ")),