diff options
| author | Maybe Waffle <waffle.lapkin@gmail.com> | 2023-05-24 14:33:43 +0000 |
|---|---|---|
| committer | Maybe Waffle <waffle.lapkin@gmail.com> | 2023-05-24 14:33:43 +0000 |
| commit | 307799a711826294bc2b3e562cd87bf1e2ff28b4 (patch) | |
| tree | 1aa6b91ab277015585998e92e9be35f80331d7a2 /compiler/rustc_const_eval/src/transform | |
| parent | fb0f74a8c9e8b8f488ec5894d5d314caebf4c662 (diff) | |
| download | rust-307799a711826294bc2b3e562cd87bf1e2ff28b4.tar.gz rust-307799a711826294bc2b3e562cd87bf1e2ff28b4.zip | |
Use `is_some_and`/`is_ok_and` in less obvious spots
Diffstat (limited to 'compiler/rustc_const_eval/src/transform')
| -rw-r--r-- | compiler/rustc_const_eval/src/transform/check_consts/check.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_const_eval/src/transform/check_consts/check.rs b/compiler/rustc_const_eval/src/transform/check_consts/check.rs index 9f4ea658dc7..138bc3eb74a 100644 --- a/compiler/rustc_const_eval/src/transform/check_consts/check.rs +++ b/compiler/rustc_const_eval/src/transform/check_consts/check.rs @@ -944,7 +944,7 @@ impl<'tcx> Visitor<'tcx> for Checker<'_, 'tcx> { tcx.features().declared_lib_features.iter().any(|&(sym, _)| sym == gate) }; let feature_gate_declared = gate_declared(gate); - let implied_gate_declared = implied_by.map(gate_declared).unwrap_or(false); + let implied_gate_declared = implied_by.is_some_and(gate_declared); if !feature_gate_declared && !implied_gate_declared { self.check_op(ops::FnCallUnstable(callee, Some(gate))); return; |
