about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-07-12 01:18:12 +0000
committerbors <bors@rust-lang.org>2024-07-12 01:18:12 +0000
commit4a31a6c32a9a0e726516b1086f33e3d4a37dc94c (patch)
tree35c092b39b4b9df142377490e05d854dc470abb2 /compiler/rustc_parse/src/parser
parent5e311f933d844b6922256a0c0aa49b86159534f5 (diff)
parent4df75140dde8776fb4e371a28474d899524d99e5 (diff)
downloadrust-4a31a6c32a9a0e726516b1086f33e3d4a37dc94c.tar.gz
rust-4a31a6c32a9a0e726516b1086f33e3d4a37dc94c.zip
Auto merge of #127382 - estebank:const-let, r=compiler-errors
Use verbose style when suggesting changing `const` with `let`
Diffstat (limited to 'compiler/rustc_parse/src/parser')
-rw-r--r--compiler/rustc_parse/src/parser/item.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/item.rs b/compiler/rustc_parse/src/parser/item.rs
index 2c98feeece7..d2fea5583b8 100644
--- a/compiler/rustc_parse/src/parser/item.rs
+++ b/compiler/rustc_parse/src/parser/item.rs
@@ -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",