Use `span_suggestion_verbose` instead of `span_suggestion` for `fn` with qualifiers inside an `extern "C"` block

This commit is contained in:
ThePuzzlemaker 2020-11-15 14:36:07 -06:00
parent efcb3b3920
commit 92aa0e6295
No known key found for this signature in database
GPG Key ID: 968CD9D71C9FBB6C
1 changed files with 1 additions and 1 deletions

View File

@ -522,7 +522,7 @@ impl<'a> AstValidator<'a> {
self.err_handler()
.struct_span_err(ident.span, "functions in `extern` blocks cannot have qualifiers")
.span_label(self.current_extern_span(), "in this `extern` block")
.span_suggestion(
.span_suggestion_verbose(
span.until(ident.span.shrink_to_lo()),
"remove the qualifiers",
"fn ".to_string(),