about summary refs log tree commit diff
path: root/src/rustdoc
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-03-02 13:44:40 -0800
committerBrian Anderson <banderson@mozilla.com>2012-03-02 13:44:40 -0800
commit95099cddcf2691fcbb389db657c70cf80d776918 (patch)
tree22195871800c3dcf5371e3e31c744c8fedb75ae6 /src/rustdoc
parentc0a5e21b29ca6a9901180451f0b31210b9a5bc84 (diff)
downloadrust-95099cddcf2691fcbb389db657c70cf80d776918.tar.gz
rust-95099cddcf2691fcbb389db657c70cf80d776918.zip
rust: xfail-fast run-pass/cci_no_inline_exe
Diffstat (limited to 'src/rustdoc')
-rw-r--r--src/rustdoc/doc.rs2
-rw-r--r--src/rustdoc/markdown_index_pass.rs29
-rw-r--r--src/rustdoc/rustdoc.rc1
-rwxr-xr-xsrc/rustdoc/rustdoc.rs1
4 files changed, 31 insertions, 2 deletions
diff --git a/src/rustdoc/doc.rs b/src/rustdoc/doc.rs
index aa1bca2eab9..ceca4cb5a72 100644
--- a/src/rustdoc/doc.rs
+++ b/src/rustdoc/doc.rs
@@ -122,14 +122,12 @@ Fields:
 
 * kind - The type of thing being indexed, e.g. 'Module'
 * name - The name of the thing
-* brief - A description
 * link - A format-specific string representing the link target
 
 "]
 type index_entry = {
     kind: str,
     name: str,
-    brief: str,
     link: str
 };
 
diff --git a/src/rustdoc/markdown_index_pass.rs b/src/rustdoc/markdown_index_pass.rs
new file mode 100644
index 00000000000..038b0083623
--- /dev/null
+++ b/src/rustdoc/markdown_index_pass.rs
@@ -0,0 +1,29 @@
+#[doc = "Build indexes as appropriate for the markdown pass"];
+
+export mk_pass;
+
+fn mk_pass() -> pass {
+    {
+        name: "markdown_index",
+        f: run
+    }
+}
+
+fn run(_srv: astsrv::srv, doc: doc::cratedoc) -> doc::cratedoc {
+    doc
+}
+
+#[test]
+fn should_index_mod_contents() {
+    
+}
+
+#[cfg(test)]
+mod test {
+    fn mk_doc(source: str) -> doc::cratedoc {
+        astsrv::from_str(source) {|srv|
+            let doc = extract::from_srv(srv, "");
+            run(srv, doc);
+        }
+    }
+}
\ No newline at end of file
diff --git a/src/rustdoc/rustdoc.rc b/src/rustdoc/rustdoc.rc
index 5f88ca4bdf9..69a95cfd24c 100644
--- a/src/rustdoc/rustdoc.rc
+++ b/src/rustdoc/rustdoc.rc
@@ -17,6 +17,7 @@ mod parse;
 mod extract;
 mod attr_parser;
 mod doc;
+mod markdown_index_pass;
 mod markdown_pass;
 mod markdown_writer;
 mod fold;
diff --git a/src/rustdoc/rustdoc.rs b/src/rustdoc/rustdoc.rs
index 86af77a687f..df0e014eb41 100755
--- a/src/rustdoc/rustdoc.rs
+++ b/src/rustdoc/rustdoc.rs
@@ -147,6 +147,7 @@ fn run(config: config::config) {
             unindent_pass::mk_pass(),
             sort_item_name_pass::mk_pass(),
             sort_item_type_pass::mk_pass(),
+            markdown_index_pass::mk_pass(),
             markdown_pass::mk_pass(config)
         ]);
     }