mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
Rollup merge of #102820 - ehuss:let-else-nightly-suggestion, r=petrochenkov
Show let-else suggestion on stable.
The E0005 error message has a suggestion to use let-else. Now that let-else is stabilized, I think this message should be included on non-nightly toolchains. I suspect this was just an oversight from #93628. [`E0005.stderr`](be1c7aad72/src/test/ui/error-codes/E0005.stderr (L22-L25)
) contains an example of what this suggestion looks like.
This commit is contained in:
commit
c5d4456564
@ -491,7 +491,7 @@ impl<'p, 'tcx> MatchVisitor<'_, 'p, 'tcx> {
|
||||
],
|
||||
Applicability::HasPlaceholders,
|
||||
);
|
||||
if !bindings.is_empty() && cx.tcx.sess.is_nightly_build() {
|
||||
if !bindings.is_empty() {
|
||||
err.span_suggestion_verbose(
|
||||
semi_span.shrink_to_lo(),
|
||||
&format!(
|
||||
|
Loading…
Reference in New Issue
Block a user