Use is_some_and
/is_ok_and
in less obvious spots
This commit is contained in:
parent
fb0f74a8c9
commit
307799a711
19 changed files with 53 additions and 88 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue