Skip to content

Commit c5cdf74

Browse files
committed
Auto merge of rust-lang#98354 - camsteffen:is-some-and-by-value, r=m-ou-se
Change `is_some_and` to take by value Consistent with other function-accepting `Option` methods. Tracking issue: rust-lang#93050 r? `@m-ou-se`
2 parents ebe2484 + d5d270e commit c5cdf74

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#![feature(int_log)]
88
#![feature(variant_count)]
99
#![feature(yeet_expr)]
10-
#![feature(is_some_with)]
10+
#![feature(is_some_and)]
1111
#![feature(nonzero_ops)]
1212
#![feature(local_key_cell_methods)]
1313
#![cfg_attr(bootstrap, feature(let_else))]

src/stacked_borrows/stack.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ impl<'tcx> Stack {
211211
}
212212

213213
// Couldn't find it in the stack; but if there is an unknown bottom it might be there.
214-
let found = self.unknown_bottom.is_some_and(|&unknown_limit| {
214+
let found = self.unknown_bottom.is_some_and(|unknown_limit| {
215215
tag.0 < unknown_limit.0 // unknown_limit is an upper bound for what can be in the unknown bottom.
216216
});
217217
if found { Ok(None) } else { Err(()) }

0 commit comments

Comments
 (0)