about summary refs log tree commit diff
path: root/compiler/rustc_mir_build
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2021-02-18 16:57:37 +0100
committerGitHub <noreply@github.com>2021-02-18 16:57:37 +0100
commitb3d325127143296de07269da7940a411526df022 (patch)
tree0ad15dcddfe3a66f30c30605f1150bcf4314cd3e /compiler/rustc_mir_build
parentf01b339dae824e61feba6b778fdd701cbb68c820 (diff)
parent0f04875d2e21919e5f716b9946407ba07de08840 (diff)
downloadrust-b3d325127143296de07269da7940a411526df022.tar.gz
rust-b3d325127143296de07269da7940a411526df022.zip
Rollup merge of #82215 - TaKO8Ki:replace-if-let-while-let, r=varkor
Replace if-let and while-let with `if let` and `while let`

This pull request replaces if-let and while-let with `if let` and `while let`.

closes https://github.com/rust-lang/rust/issues/82205
Diffstat (limited to 'compiler/rustc_mir_build')
-rw-r--r--compiler/rustc_mir_build/src/thir/pattern/check_match.rs6
1 files changed, 3 insertions, 3 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 6ec602ff59b..e928f3c5d4d 100644
--- a/compiler/rustc_mir_build/src/thir/pattern/check_match.rs
+++ b/compiler/rustc_mir_build/src/thir/pattern/check_match.rs
@@ -368,9 +368,9 @@ fn unreachable_pattern(tcx: TyCtxt<'_>, span: Span, id: HirId, catchall: Option<
 fn irrefutable_let_pattern(tcx: TyCtxt<'_>, span: Span, id: HirId, source: hir::MatchSource) {
     tcx.struct_span_lint_hir(IRREFUTABLE_LET_PATTERNS, id, span, |lint| {
         let msg = match source {
-            hir::MatchSource::IfLetDesugar { .. } => "irrefutable if-let pattern",
-            hir::MatchSource::WhileLetDesugar => "irrefutable while-let pattern",
-            hir::MatchSource::IfLetGuardDesugar => "irrefutable if-let guard",
+            hir::MatchSource::IfLetDesugar { .. } => "irrefutable `if let` pattern",
+            hir::MatchSource::WhileLetDesugar => "irrefutable `while let` pattern",
+            hir::MatchSource::IfLetGuardDesugar => "irrefutable `if let` guard",
             _ => bug!(),
         };
         lint.build(msg).emit()