about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMarijn Haverbeke <marijnh@gmail.com>2011-12-22 22:16:02 +0100
committerMarijn Haverbeke <marijnh@gmail.com>2011-12-22 22:16:02 +0100
commit9587c672301663d46f8d97d34bb82cd0506f8454 (patch)
treeea9462dfd9d5df20048fb27e5ffc12112ad34380
parenteacb629442e0e0869c6e230671afdeb8d002eefb (diff)
downloadrust-9587c672301663d46f8d97d34bb82cd0506f8454.tar.gz
rust-9587c672301663d46f8d97d34bb82cd0506f8454.zip
Fix rustdoc for AST changes
-rwxr-xr-xsrc/rustdoc/rustdoc.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/rustdoc/rustdoc.rs b/src/rustdoc/rustdoc.rs
index de8c0429214..055f3e7749d 100755
--- a/src/rustdoc/rustdoc.rs
+++ b/src/rustdoc/rustdoc.rs
@@ -34,7 +34,7 @@ type fndoc = {
        doc = "Function docs extracted from attributes",
        _fn = "AST object representing this function")
 )]
-fn doc_fn(rd: rustdoc, ident: str, doc: fndoc, _fn: ast::_fn) {
+fn doc_fn(rd: rustdoc, ident: str, doc: fndoc, decl: ast::fn_decl) {
     rd.w.write_line("## Function `" + ident + "`");
     rd.w.write_line(doc.brief);
     alt doc.desc {
@@ -45,7 +45,7 @@ fn doc_fn(rd: rustdoc, ident: str, doc: fndoc, _fn: ast::_fn) {
         }
         none. { }
     }
-    for arg: ast::arg in _fn.decl.inputs {
+    for arg: ast::arg in decl.inputs {
         rd.w.write_str("### Argument `" + arg.ident + "`: ");
         rd.w.write_line("`" + pprust::ty_to_str(arg.ty) + "`");
         alt doc.args.find(arg.ident) {
@@ -55,7 +55,7 @@ fn doc_fn(rd: rustdoc, ident: str, doc: fndoc, _fn: ast::_fn) {
             none. { }
         };
     }
-    rd.w.write_line("### Returns `" + pprust::ty_to_str(_fn.decl.output) + "`");
+    rd.w.write_line("### Returns `" + pprust::ty_to_str(decl.output) + "`");
     alt doc.return {
         some(_r) { rd.w.write_line(_r); }
         none. { }
@@ -152,14 +152,14 @@ fn doc_item(rd: rustdoc, item: @ast::item) {
 
     alt item.node {
         ast::item_const(ty, expr) { }
-        ast::item_fn(_fn, _) {
-            doc_fn(rd, item.ident, _fndoc0, _fn);
+        ast::item_fn(decl, _, _) {
+            doc_fn(rd, item.ident, _fndoc0, decl);
         }
         ast::item_mod(_mod) { }
         ast::item_ty(ty, typarams) { }
         ast::item_tag(variant, typarams) { }
         ast::item_obj(_obj, typarams, node_id) { }
-        ast::item_res(dtor, dtorid, typarams, ctorid) { }
+        ast::item_res(_, _, _, _, _) { }
     };
 }