Remove dead code

This commit is contained in:
Joshua Nelson 2020-08-06 18:57:56 -04:00
parent d240490229
commit 17263bc2da

View File

@ -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.