We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d9e997d commit 9a68003Copy full SHA for 9a68003
compiler/rustc_resolve/src/late/diagnostics.rs
@@ -2115,6 +2115,11 @@ impl<'tcx> LifetimeContext<'_, 'tcx> {
2115
})
2116
.map(|(formatter, span)| (*span, formatter(name)))
2117
.collect();
2118
+ if spans_suggs.is_empty() {
2119
+ // If all the spans come from macros, we cannot extract snippets and then
2120
+ // `formatters` only contains None and `spans_suggs` is empty.
2121
+ return;
2122
+ }
2123
err.multipart_suggestion_verbose(
2124
&format!(
2125
"consider using the `{}` lifetime",
0 commit comments