Skip to content

Commit 17263bc

Browse files
committed
Remove dead code
1 parent d240490 commit 17263bc

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

src/librustdoc/passes/collect_intra_doc_links.rs

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ impl<'a, 'tcx> DocFolder for LinkCollector<'a, 'tcx> {
779779
// All of these are valid, so do nothing
780780
=> {}
781781
(actual, Some(Disambiguator::Kind(expected))) if actual == expected => {}
782-
(_, Some(expected)) => {
782+
(_, Some(Disambiguator::Kind(expected))) => {
783783
// The resolved item did not match the disambiguator; give a better error than 'not found'
784784
let msg = format!("incompatible link kind for `{}`", path_str);
785785
report_diagnostic(cx, &msg, &item, &dox, link_range, |diag, sp| {
@@ -934,22 +934,6 @@ impl Disambiguator {
934934
}
935935
}
936936
}
937-
938-
fn article(&self) -> &'static str {
939-
match self {
940-
Self::Namespace(_) => "a",
941-
Self::Kind(kind) => kind.article(),
942-
}
943-
}
944-
945-
fn descr(&self, def_id: DefId) -> &'static str {
946-
match self {
947-
Self::Namespace(Namespace::TypeNS) => "type",
948-
Self::Namespace(Namespace::ValueNS) => "value",
949-
Self::Namespace(Namespace::MacroNS) => "macro",
950-
Self::Kind(kind) => kind.descr(def_id),
951-
}
952-
}
953937
}
954938

955939
/// Reports a diagnostic for an intra-doc link.

0 commit comments

Comments
 (0)