rustdoc: Fix native mod breakage

This commit is contained in:
Brian Anderson 2012-03-10 16:43:38 -08:00
parent 4bbe33c8eb
commit 474ad2e4de

View File

@ -420,6 +420,7 @@ fn write_nmod(ctxt: ctxt, doc: doc::nmoddoc) {
write_common(ctxt, doc.desc(), doc.sections());
for fndoc in doc.fns {
write_item_header(ctxt, doc::fntag(fndoc));
write_fn(ctxt, fndoc);
}
}
@ -437,6 +438,12 @@ fn should_write_native_fns() {
assert str::contains(markdown, "test");
}
#[test]
fn should_write_native_fn_headers() {
let markdown = test::render("native mod a { #[doc = \"test\"] fn a(); }");
assert str::contains(markdown, "## Function `a`");
}
fn write_fn(
ctxt: ctxt,
doc: doc::fndoc