Use verbose style when suggesting changing const
with let
This commit is contained in:
parent
bcf1f6db45
commit
b56dc8ee90
20 changed files with 153 additions and 82 deletions
|
@ -810,7 +810,7 @@ impl<'a> Parser<'a> {
|
|||
self.dcx().struct_span_err(non_item_span, "non-item in item list");
|
||||
self.consume_block(Delimiter::Brace, ConsumeClosingDelim::Yes);
|
||||
if is_let {
|
||||
err.span_suggestion(
|
||||
err.span_suggestion_verbose(
|
||||
non_item_span,
|
||||
"consider using `const` instead of `let` for associated const",
|
||||
"const",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue