rustdoc: Convert fn return type to retdoc record
This commit is contained in:
@@ -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); }
|
||||
_ { }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user