Remove unnecessary conditional for suggesting disambiguator

Now that `res` is used directly, it seems the conditional is
unnecessary.
This commit is contained in:
Noah Lev
2022-01-06 14:45:23 -08:00
parent 9acd813380
commit 591ec49df3
@@ -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",