diff --git a/src/librustdoc/passes/collect_intra_doc_links.rs b/src/librustdoc/passes/collect_intra_doc_links.rs index 20e248a445cb..dd2fa9d62736 100644 --- a/src/librustdoc/passes/collect_intra_doc_links.rs +++ b/src/librustdoc/passes/collect_intra_doc_links.rs @@ -2062,10 +2062,7 @@ fn split(path: &str) -> Option<(&str, &str)> { ResolutionFailure::NotResolved { .. } => unreachable!("handled above"), ResolutionFailure::Dummy => continue, ResolutionFailure::WrongNamespace { res, expected_ns } => { - // FIXME: does this need to be behind an `if`? - if matches!(res, Res::Def(..)) { - suggest_disambiguator(res, diag, path_str, diag_info.ori_link, sp); - } + suggest_disambiguator(res, diag, path_str, diag_info.ori_link, sp); format!( "this link resolves to {}, which is not in the {} namespace",