about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJoshua Nelson <jyn514@gmail.com>2020-08-06 18:57:56 -0400
committerJoshua Nelson <jyn514@gmail.com>2020-08-06 18:57:56 -0400
commit17263bc2da9fe312556afe0812db82e9f41b9a6e (patch)
tree488d3f5ea261b0dd32001f94d6e30abc166e5071
parentd240490229b31e1ebd6871a08ee2cefeb580ba78 (diff)
downloadrust-17263bc2da9fe312556afe0812db82e9f41b9a6e.tar.gz
rust-17263bc2da9fe312556afe0812db82e9f41b9a6e.zip
Remove dead code
-rw-r--r--src/librustdoc/passes/collect_intra_doc_links.rs18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/librustdoc/passes/collect_intra_doc_links.rs b/src/librustdoc/passes/collect_intra_doc_links.rs
index 00169530381..343a067508a 100644
--- a/src/librustdoc/passes/collect_intra_doc_links.rs
+++ b/src/librustdoc/passes/collect_intra_doc_links.rs
@@ -779,7 +779,7 @@ impl<'a, 'tcx> DocFolder for LinkCollector<'a, 'tcx> {
                         // All of these are valid, so do nothing
                         => {}
                         (actual, Some(Disambiguator::Kind(expected))) if actual == expected => {}
-                        (_, Some(expected)) => {
+                        (_, Some(Disambiguator::Kind(expected))) => {
                             // The resolved item did not match the disambiguator; give a better error than 'not found'
                             let msg = format!("incompatible link kind for `{}`", path_str);
                             report_diagnostic(cx, &msg, &item, &dox, link_range, |diag, sp| {
@@ -934,22 +934,6 @@ impl Disambiguator {
             }
         }
     }
-
-    fn article(&self) -> &'static str {
-        match self {
-            Self::Namespace(_) => "a",
-            Self::Kind(kind) => kind.article(),
-        }
-    }
-
-    fn descr(&self, def_id: DefId) -> &'static str {
-        match self {
-            Self::Namespace(Namespace::TypeNS) => "type",
-            Self::Namespace(Namespace::ValueNS) => "value",
-            Self::Namespace(Namespace::MacroNS) => "macro",
-            Self::Kind(kind) => kind.descr(def_id),
-        }
-    }
 }
 
 /// Reports a diagnostic for an intra-doc link.