Auto merge of #127382 - estebank:const-let, r=compiler-errors
Use verbose style when suggesting changing `const` with `let`
This commit is contained in:
commit
4a31a6c32a
25 changed files with 245 additions and 129 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