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(¬e); if let Some(sp) = sp { diag.span_suggestion(sp, &help_msg, suggestion, Applicability::MaybeIncorrect); + } else { + diag.help(&format!("{}: {}", help_msg, suggestion)); } }); continue;