diff options
| author | Yuki Okushi <jtitor@2k36.org> | 2022-10-10 00:09:41 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-10 00:09:41 +0900 |
| commit | c5d445656425b3f8fdf2bb16ba53ab6ed4537875 (patch) | |
| tree | 55572fb36e6d4c161c9b92592d9d43a6bbc494f6 | |
| parent | fb27d01922a5d7401959b95ce2c16cd02b7fac28 (diff) | |
| parent | be1c7aad723126b2ea65543b4ceed54167b841a2 (diff) | |
| download | rust-c5d445656425b3f8fdf2bb16ba53ab6ed4537875.tar.gz rust-c5d445656425b3f8fdf2bb16ba53ab6ed4537875.zip | |
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`](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.
| -rw-r--r-- | compiler/rustc_mir_build/src/thir/pattern/check_match.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_mir_build/src/thir/pattern/check_match.rs b/compiler/rustc_mir_build/src/thir/pattern/check_match.rs index 8fca94119c2..ec709a1db51 100644 --- a/compiler/rustc_mir_build/src/thir/pattern/check_match.rs +++ b/compiler/rustc_mir_build/src/thir/pattern/check_match.rs @@ -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!( |
