rustdoc: Convert fn return type to retdoc record

This commit is contained in:
Brian Anderson
2012-01-16 14:02:46 -08:00
parent 63dcc64275
commit e77b8db707
3 changed files with 14 additions and 6 deletions

View File

@@ -100,12 +100,12 @@ fn write_fndoc(ctxt: ctxt, ident: str, doc: doc::fndoc, decl: ast::fn_decl) {
}
for (arg, desc) in doc.args {
ctxt.w.write_str("### Argument `" + arg + "`: ");
ctxt.w.write_str(desc);
ctxt.w.write_str(desc)
}
ctxt.w.write_line("### Returns `" + pprust::ty_to_str(decl.output) + "`");
alt doc.return {
some(_r) { ctxt.w.write_line(_r); }
none. { }
some({desc: some(d), _}) { ctxt.w.write_line(d); }
_ { }
}
}