about summary refs log tree commit diff
path: root/src/rustdoc
diff options
context:
space:
mode:
authorMarijn Haverbeke <marijnh@gmail.com>2012-03-07 12:21:08 +0100
committerMarijn Haverbeke <marijnh@gmail.com>2012-03-08 21:17:32 +0100
commitfd465f91a89450b7daebecdde9c280a923bbe394 (patch)
tree58d345ca820a4248419a99421367a2e01257a415 /src/rustdoc
parent6f8fe781200e985d4d12d1b0ea4a7b338e6220a5 (diff)
downloadrust-fd465f91a89450b7daebecdde9c280a923bbe394.tar.gz
rust-fd465f91a89450b7daebecdde9c280a923bbe394.zip
Drop collect_items pass, create decls on demand
This solves a problem with inlined functions that have inner functions.
Diffstat (limited to 'src/rustdoc')
-rw-r--r--src/rustdoc/astsrv.rs2
-rw-r--r--src/rustdoc/attr_pass.rs2
-rw-r--r--src/rustdoc/tystr_pass.rs6
3 files changed, 5 insertions, 5 deletions
diff --git a/src/rustdoc/astsrv.rs b/src/rustdoc/astsrv.rs
index 718e8af35b9..7bbc8fc3b43 100644
--- a/src/rustdoc/astsrv.rs
+++ b/src/rustdoc/astsrv.rs
@@ -109,7 +109,7 @@ fn build_ctxt(sess: session::session, ast: @ast::crate,
 
     let ast = config::strip_unconfigured_items(ast);
     let ast = front::test::modify_for_testing(sess, ast);
-    let ast_map = ast_map::map_crate(*ast);
+    let ast_map = ast_map::map_crate(sess, *ast);
     *ignore_errors = true;
     let exp_map = resolve::resolve_crate_reexports(sess, ast_map, ast);
     *ignore_errors = false;
diff --git a/src/rustdoc/attr_pass.rs b/src/rustdoc/attr_pass.rs
index 70572fad825..20c7591417e 100644
--- a/src/rustdoc/attr_pass.rs
+++ b/src/rustdoc/attr_pass.rs
@@ -97,7 +97,7 @@ fn parse_item_attrs<T:send>(
     astsrv::exec(srv) {|ctxt|
         let attrs = alt ctxt.ast_map.get(id) {
           ast_map::node_item(item, _) { item.attrs }
-          ast_map::node_native_item(item, _) { item.attrs }
+          ast_map::node_native_item(item, _, _) { item.attrs }
           _ {
             fail "parse_item_attrs: not an item";
           }
diff --git a/src/rustdoc/tystr_pass.rs b/src/rustdoc/tystr_pass.rs
index 5e630ac2ade..5ad366115ea 100644
--- a/src/rustdoc/tystr_pass.rs
+++ b/src/rustdoc/tystr_pass.rs
@@ -57,7 +57,7 @@ fn get_fn_sig(srv: astsrv::srv, fn_id: doc::ast_id) -> option<str> {
           ast_map::node_native_item(@{
             ident: ident,
             node: ast::native_item_fn(decl, _), _
-          }, _) {
+          }, _, _) {
             some(pprust::fun_to_str(decl, ident, []))
           }
         }
@@ -100,7 +100,7 @@ fn get_ret_ty(srv: astsrv::srv, fn_id: doc::ast_id) -> option<str> {
           }, _) |
           ast_map::node_native_item(@{
             node: ast::native_item_fn(decl, _), _
-          }, _) {
+          }, _, _) {
             ret_ty_to_str(decl)
           }
         }
@@ -161,7 +161,7 @@ fn get_arg_tys(srv: astsrv::srv, fn_id: doc::ast_id) -> [(str, str)] {
           }, _) |
           ast_map::node_native_item(@{
             node: ast::native_item_fn(decl, _), _
-          }, _) {
+          }, _, _) {
             decl_arg_tys(decl)
           }
         }