about summary refs log tree commit diff
path: root/src/rustdoc
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2012-09-18 11:26:07 -0700
committerPatrick Walton <pcwalton@mimiga.net>2012-09-18 11:27:37 -0700
commit3b013cd800ce675a445220105911bbefd2427e47 (patch)
tree4fb4cb8cac3c8d861e20a4da7fab48dcf54ef247 /src/rustdoc
parent859a892eb019c115ed8fc790903c8f459743a68a (diff)
downloadrust-3b013cd800ce675a445220105911bbefd2427e47.tar.gz
rust-3b013cd800ce675a445220105911bbefd2427e47.zip
rustc: Change all non-keyword uses of "link"
Diffstat (limited to 'src/rustdoc')
-rw-r--r--src/rustdoc/astsrv.rs1
-rw-r--r--src/rustdoc/doc.rs6
-rw-r--r--src/rustdoc/markdown_index_pass.rs16
-rw-r--r--src/rustdoc/markdown_pass.rs2
4 files changed, 12 insertions, 13 deletions
diff --git a/src/rustdoc/astsrv.rs b/src/rustdoc/astsrv.rs
index cda89e3b083..1f6ba5ed907 100644
--- a/src/rustdoc/astsrv.rs
+++ b/src/rustdoc/astsrv.rs
@@ -17,7 +17,6 @@ use syntax::diagnostic::handler;
 use syntax::ast;
 use syntax::codemap;
 use syntax::ast_map;
-use rustc::back::link;
 use rustc::metadata::filesearch;
 use rustc::front;
 
diff --git a/src/rustdoc/doc.rs b/src/rustdoc/doc.rs
index 5161fdff270..154a7f1c6d0 100644
--- a/src/rustdoc/doc.rs
+++ b/src/rustdoc/doc.rs
@@ -334,13 +334,13 @@ impl index : cmp::Eq {
  * * kind - The type of thing being indexed, e.g. 'Module'
  * * name - The name of the thing
  * * brief - The brief description
- * * link - A format-specific string representing the link target
+ * * lnk - A format-specific string representing the link target
  */
 type index_entry = {
     kind: ~str,
     name: ~str,
     brief: Option<~str>,
-    link: ~str
+    lnk: ~str
 };
 
 impl index_entry : cmp::Eq {
@@ -348,7 +348,7 @@ impl index_entry : cmp::Eq {
         self.kind == other.kind &&
         self.name == other.name &&
         self.brief == other.brief &&
-        self.link == other.link
+        self.lnk == other.lnk
     }
     pure fn ne(&&other: index_entry) -> bool { !self.eq(other) }
 }
diff --git a/src/rustdoc/markdown_index_pass.rs b/src/rustdoc/markdown_index_pass.rs
index 172147b1f24..067951ef6f9 100644
--- a/src/rustdoc/markdown_index_pass.rs
+++ b/src/rustdoc/markdown_index_pass.rs
@@ -78,7 +78,7 @@ fn item_to_entry(
     doc: doc::itemtag,
     config: config::config
 ) -> doc::index_entry {
-    let link = match doc {
+    let lnk = match doc {
       doc::modtag(_) | doc::nmodtag(_)
       if config.output_style == config::doc_per_mod => {
         markdown_writer::make_filename(config, doc::itempage(doc)).to_str()
@@ -92,7 +92,7 @@ fn item_to_entry(
         kind: markdown_pass::header_kind(doc),
         name: markdown_pass::header_name(doc),
         brief: doc.brief(),
-        link: link
+        lnk: lnk
     }
 }
 
@@ -156,13 +156,13 @@ fn should_index_mod_contents() {
         kind: ~"Module",
         name: ~"a",
         brief: None,
-        link: ~"#module-a"
+        lnk: ~"#module-a"
     };
     assert option::get(doc.cratemod().index).entries[1] == {
         kind: ~"Function",
         name: ~"b",
         brief: None,
-        link: ~"#function-b"
+        lnk: ~"#function-b"
     };
 }
 
@@ -176,13 +176,13 @@ fn should_index_mod_contents_multi_page() {
         kind: ~"Module",
         name: ~"a",
         brief: None,
-        link: ~"a.html"
+        lnk: ~"a.html"
     };
     assert option::get(doc.cratemod().index).entries[1] == {
         kind: ~"Function",
         name: ~"b",
         brief: None,
-        link: ~"#function-b"
+        lnk: ~"#function-b"
     };
 }
 
@@ -196,7 +196,7 @@ fn should_index_foreign_mod_pages() {
         kind: ~"Foreign module",
         name: ~"a",
         brief: None,
-        link: ~"a.html"
+        lnk: ~"a.html"
     };
 }
 
@@ -220,7 +220,7 @@ fn should_index_foreign_mod_contents() {
         kind: ~"Function",
         name: ~"b",
         brief: None,
-        link: ~"#function-b"
+        lnk: ~"#function-b"
     };
 }
 
diff --git a/src/rustdoc/markdown_pass.rs b/src/rustdoc/markdown_pass.rs
index 03726ca0188..726bbc56237 100644
--- a/src/rustdoc/markdown_pass.rs
+++ b/src/rustdoc/markdown_pass.rs
@@ -398,7 +398,7 @@ fn write_index(ctxt: ctxt, index: doc::index) {
 
     for index.entries.each |entry| {
         let header = header_text_(entry.kind, entry.name);
-        let id = entry.link;
+        let id = entry.lnk;
         if option::is_some(entry.brief) {
             ctxt.w.write_line(fmt!("* [%s](%s) - %s",
                                    header, id, option::get(entry.brief)));