about summary refs log tree commit diff
path: root/compiler/rustc_mir_build
diff options
context:
space:
mode:
authorYuki Okushi <jtitor@2k36.org>2022-02-03 22:20:27 +0900
committerGitHub <noreply@github.com>2022-02-03 22:20:27 +0900
commit7712dfd46e059ebdfe45ab2a4335355e2249cb87 (patch)
treed8c8acce3e7f04f8cd1d52ab71cb594f69c20ee1 /compiler/rustc_mir_build
parent333d3d624321057ead2ce06fd346c940b9ce97bd (diff)
parent08be313febc8146a3a8f57d46b33602bdbd1d30e (diff)
downloadrust-7712dfd46e059ebdfe45ab2a4335355e2249cb87.tar.gz
rust-7712dfd46e059ebdfe45ab2a4335355e2249cb87.zip
Rollup merge of #93589 - est31:option_then, r=cjgillot
Use Option::then in two places
Diffstat (limited to 'compiler/rustc_mir_build')
-rw-r--r--compiler/rustc_mir_build/src/build/matches/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_mir_build/src/build/matches/mod.rs b/compiler/rustc_mir_build/src/build/matches/mod.rs
index 6329bcee4fa..a4e100973b6 100644
--- a/compiler/rustc_mir_build/src/build/matches/mod.rs
+++ b/compiler/rustc_mir_build/src/build/matches/mod.rs
@@ -264,7 +264,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
         // The set of places that we are creating fake borrows of. If there are
         // no match guards then we don't need any fake borrows, so don't track
         // them.
-        let mut fake_borrows = if match_has_guard { Some(FxHashSet::default()) } else { None };
+        let mut fake_borrows = match_has_guard.then(FxHashSet::default);
 
         let mut otherwise = None;