Skip to content

Commit

Permalink
Rollup merge of rust-lang#102820 - ehuss:let-else-nightly-suggestion,…
Browse files Browse the repository at this point in the history
… 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.
  • Loading branch information
Dylan-DPC authored Oct 9, 2022
2 parents 13baeee + be1c7aa commit c944211
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_mir_build/src/thir/pattern/check_match.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!(
Expand Down

0 comments on commit c944211

Please sign in to comment.