about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJoshua Nelson <jyn514@gmail.com>2020-08-06 17:10:52 -0400
committerJoshua Nelson <jyn514@gmail.com>2020-08-06 17:10:52 -0400
commitf05e9da493a9e447dd2dafc271b06ad80358496f (patch)
tree0130747d70ae02575931a917d68e915dd603c3a9
parent2dad90d8b5c33c3aeef146d709b7f9ae66db49f4 (diff)
downloadrust-f05e9da493a9e447dd2dafc271b06ad80358496f.tar.gz
rust-f05e9da493a9e447dd2dafc271b06ad80358496f.zip
Still print help even if there's no span
-rw-r--r--src/librustdoc/passes/collect_intra_doc_links.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/librustdoc/passes/collect_intra_doc_links.rs b/src/librustdoc/passes/collect_intra_doc_links.rs
index ef44c9c937d..a119e67ed7b 100644
--- a/src/librustdoc/passes/collect_intra_doc_links.rs
+++ b/src/librustdoc/passes/collect_intra_doc_links.rs
@@ -787,6 +787,8 @@ 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);
+                                } else {
+                                    diag.help(&format!("{}: {}", help_msg, suggestion));
                                 }
                             });
                             continue;