Skip to content

Commit 9587c67

Browse files
committed
Fix rustdoc for AST changes
1 parent eacb629 commit 9587c67

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/rustdoc/rustdoc.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ type fndoc = {
3434
doc = "Function docs extracted from attributes",
3535
_fn = "AST object representing this function")
3636
)]
37-
fn doc_fn(rd: rustdoc, ident: str, doc: fndoc, _fn: ast::_fn) {
37+
fn doc_fn(rd: rustdoc, ident: str, doc: fndoc, decl: ast::fn_decl) {
3838
rd.w.write_line("## Function `" + ident + "`");
3939
rd.w.write_line(doc.brief);
4040
alt doc.desc {
@@ -45,7 +45,7 @@ fn doc_fn(rd: rustdoc, ident: str, doc: fndoc, _fn: ast::_fn) {
4545
}
4646
none. { }
4747
}
48-
for arg: ast::arg in _fn.decl.inputs {
48+
for arg: ast::arg in decl.inputs {
4949
rd.w.write_str("### Argument `" + arg.ident + "`: ");
5050
rd.w.write_line("`" + pprust::ty_to_str(arg.ty) + "`");
5151
alt doc.args.find(arg.ident) {
@@ -55,7 +55,7 @@ fn doc_fn(rd: rustdoc, ident: str, doc: fndoc, _fn: ast::_fn) {
5555
none. { }
5656
};
5757
}
58-
rd.w.write_line("### Returns `" + pprust::ty_to_str(_fn.decl.output) + "`");
58+
rd.w.write_line("### Returns `" + pprust::ty_to_str(decl.output) + "`");
5959
alt doc.return {
6060
some(_r) { rd.w.write_line(_r); }
6161
none. { }
@@ -152,14 +152,14 @@ fn doc_item(rd: rustdoc, item: @ast::item) {
152152

153153
alt item.node {
154154
ast::item_const(ty, expr) { }
155-
ast::item_fn(_fn, _) {
156-
doc_fn(rd, item.ident, _fndoc0, _fn);
155+
ast::item_fn(decl, _, _) {
156+
doc_fn(rd, item.ident, _fndoc0, decl);
157157
}
158158
ast::item_mod(_mod) { }
159159
ast::item_ty(ty, typarams) { }
160160
ast::item_tag(variant, typarams) { }
161161
ast::item_obj(_obj, typarams, node_id) { }
162-
ast::item_res(dtor, dtorid, typarams, ctorid) { }
162+
ast::item_res(_, _, _, _, _) { }
163163
};
164164
}
165165

0 commit comments

Comments
 (0)