1
Fork 0

Use verbose style when suggesting changing const with let

This commit is contained in:
Esteban Küber 2024-07-05 19:32:17 +00:00
parent bcf1f6db45
commit b56dc8ee90
20 changed files with 153 additions and 82 deletions

View file

@ -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",