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
|
@ -823,8 +823,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
|
|||
let is_allowed = |feature| {
|
||||
self.active_features.contains(&feature) || span.allows_unstable(feature)
|
||||
};
|
||||
let allowed_by_implication =
|
||||
implied_by.map(|feature| is_allowed(feature)).unwrap_or(false);
|
||||
let allowed_by_implication = implied_by.is_some_and(|feature| is_allowed(feature));
|
||||
if !is_allowed(feature) && !allowed_by_implication {
|
||||
let lint_buffer = &mut self.lint_buffer;
|
||||
let soft_handler =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue