Skip to content

Commit c5d4456

Browse files
authored
Rollup merge of rust-lang#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 rust-lang#93628. [`E0005.stderr`](https://github.com/ehuss/rust/blob/be1c7aad723126b2ea65543b4ceed54167b841a2/src/test/ui/error-codes/E0005.stderr#L22-L25) contains an example of what this suggestion looks like.
2 parents fb27d01 + be1c7aa commit c5d4456

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_mir_build/src/thir/pattern/check_match.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ impl<'p, 'tcx> MatchVisitor<'_, 'p, 'tcx> {
491491
],
492492
Applicability::HasPlaceholders,
493493
);
494-
if !bindings.is_empty() && cx.tcx.sess.is_nightly_build() {
494+
if !bindings.is_empty() {
495495
err.span_suggestion_verbose(
496496
semi_span.shrink_to_lo(),
497497
&format!(

0 commit comments

Comments
 (0)