about summary refs log tree commit diff
path: root/src/librustdoc/passes
diff options
context:
space:
mode:
authorJoshua Nelson <jyn514@gmail.com>2020-08-04 23:39:18 -0400
committerJoshua Nelson <jyn514@gmail.com>2020-08-05 00:20:37 -0400
commitfc273a035dfb352fd90246dd2560c807701eeea7 (patch)
tree8b10f6f1cad534050d4c103d6338f2770f506af8 /src/librustdoc/passes
parent444f5a0556fc5779663e69ff1a3d5a7362ba9618 (diff)
downloadrust-fc273a035dfb352fd90246dd2560c807701eeea7.tar.gz
rust-fc273a035dfb352fd90246dd2560c807701eeea7.zip
Unresolved link -> incompatible link kind
Clearly it has been resolved, because we say on the next line what it
resolved to.
Diffstat (limited to 'src/librustdoc/passes')
-rw-r--r--src/librustdoc/passes/collect_intra_doc_links.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/librustdoc/passes/collect_intra_doc_links.rs b/src/librustdoc/passes/collect_intra_doc_links.rs
index 03fabd3dc15..8e485b97830 100644
--- a/src/librustdoc/passes/collect_intra_doc_links.rs
+++ b/src/librustdoc/passes/collect_intra_doc_links.rs
@@ -777,7 +777,7 @@ impl<'a, 'tcx> DocFolder for LinkCollector<'a, 'tcx> {
                         (_, Some(Disambiguator::Kind(expected))) if kind == expected => {}
                         (_, Some(expected)) => {
                             // The resolved item did not match the disambiguator; give a better error than 'not found'
-                            let msg = format!("unresolved link to `{}`", path_str);
+                            let msg = format!("incompatible link kind for `{}`", path_str);
                             report_diagnostic(cx, &msg, &item, &dox, link_range, |diag, sp| {
                                 // HACK(jynelson): by looking at the source I saw the DefId we pass
                                 // for `expected.descr()` doesn't matter, since it's not a crate
@@ -787,7 +787,6 @@ impl<'a, 'tcx> DocFolder for LinkCollector<'a, 'tcx> {
                                 diag.note(&note);
                                 if let Some(sp) = sp {
                                     diag.span_suggestion(sp, &help_msg, suggestion, Applicability::MaybeIncorrect);
-                                    diag.set_sort_span(sp);
                                 }
                             });
                             continue;