Use span_suggestion_verbose
instead of span_suggestion
for fn
with qualifiers inside an extern "C"
block
This commit is contained in:
parent
efcb3b3920
commit
92aa0e6295
@ -522,7 +522,7 @@ impl<'a> AstValidator<'a> {
|
|||||||
self.err_handler()
|
self.err_handler()
|
||||||
.struct_span_err(ident.span, "functions in `extern` blocks cannot have qualifiers")
|
.struct_span_err(ident.span, "functions in `extern` blocks cannot have qualifiers")
|
||||||
.span_label(self.current_extern_span(), "in this `extern` block")
|
.span_label(self.current_extern_span(), "in this `extern` block")
|
||||||
.span_suggestion(
|
.span_suggestion_verbose(
|
||||||
span.until(ident.span.shrink_to_lo()),
|
span.until(ident.span.shrink_to_lo()),
|
||||||
"remove the qualifiers",
|
"remove the qualifiers",
|
||||||
"fn ".to_string(),
|
"fn ".to_string(),
|
||||||
|
Loading…
Reference in New Issue
Block a user