rustdoc: Fix native mod breakage
This commit is contained in:
parent
4bbe33c8eb
commit
474ad2e4de
1 changed files with 7 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue