diff options
| author | ThePuzzlemaker <tpzker@thepuzzlemaker.info> | 2020-11-15 14:36:07 -0600 |
|---|---|---|
| committer | ThePuzzlemaker <tpzker@thepuzzlemaker.info> | 2020-11-17 07:57:54 -0600 |
| commit | 92aa0e6295c39db945966d080236931396e59939 (patch) | |
| tree | 2705e6e9df7994b049e139511e1ad513cd366574 | |
| parent | efcb3b39203a0d54269ca274601b8f73207fe10d (diff) | |
| download | rust-92aa0e6295c39db945966d080236931396e59939.tar.gz rust-92aa0e6295c39db945966d080236931396e59939.zip | |
Use `span_suggestion_verbose` instead of `span_suggestion` for `fn` with qualifiers inside an `extern "C"` block
| -rw-r--r-- | compiler/rustc_ast_passes/src/ast_validation.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_ast_passes/src/ast_validation.rs b/compiler/rustc_ast_passes/src/ast_validation.rs index bb1d2967d6a..08ebcbf381a 100644 --- a/compiler/rustc_ast_passes/src/ast_validation.rs +++ b/compiler/rustc_ast_passes/src/ast_validation.rs @@ -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(), |
