Still print help even if there's no span

This commit is contained in:
Joshua Nelson 2020-08-06 17:10:52 -04:00
parent 2dad90d8b5
commit f05e9da493

View file

@ -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;