提交 c06e62e0 编写于 作者: B Brian Anderson

rustdoc: Write markdown for argument types

上级 6da55efa
......@@ -136,7 +136,12 @@ fn write_args(
}
fn write_arg(ctxt: ctxt, arg: doc::argdoc) {
ctxt.w.write_line(#fmt("* %s", arg.name));
assert option::is_some(arg.ty);
ctxt.w.write_line(#fmt(
"* %s: `%s`",
arg.name,
option::get(arg.ty)
));
}
#[test]
......@@ -147,8 +152,8 @@ fn should_write_argument_list() {
markdown,
"Arguments:\n\
\n\
* b\n\
* c\n\
* b: `int`\n\
* c: `int`\n\
\n"
);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册