diff options
| author | Noah Lev <camelidcamel@gmail.com> | 2022-01-06 14:45:23 -0800 |
|---|---|---|
| committer | Noah Lev <camelidcamel@gmail.com> | 2022-01-10 19:23:26 -0800 |
| commit | 591ec49df312ec4cbcdec0f082f123f473c182a9 (patch) | |
| tree | 08cb4899629dd1c3ad23dafbec9318784c130a45 | |
| parent | 9acd8133806504f54e023151ec789c134656a1cc (diff) | |
| download | rust-591ec49df312ec4cbcdec0f082f123f473c182a9.tar.gz rust-591ec49df312ec4cbcdec0f082f123f473c182a9.zip | |
Remove unnecessary conditional for suggesting disambiguator
Now that `res` is used directly, it seems the conditional is unnecessary.
| -rw-r--r-- | src/librustdoc/passes/collect_intra_doc_links.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/librustdoc/passes/collect_intra_doc_links.rs b/src/librustdoc/passes/collect_intra_doc_links.rs index 20e248a445c..dd2fa9d6273 100644 --- a/src/librustdoc/passes/collect_intra_doc_links.rs +++ b/src/librustdoc/passes/collect_intra_doc_links.rs @@ -2062,10 +2062,7 @@ fn resolution_failure( 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", |
