Add regression test for #11561
This commit is contained in:
parent
3b4b07c5f8
commit
3e6db95e30
@ -297,6 +297,11 @@ fn true_setter(b: &mut bool) -> impl FnOnce() + '_ {
|
|||||||
move || set_true(b)
|
move || set_true(b)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Should not warn.
|
||||||
|
fn filter_copy<T: Copy>(predicate: &mut impl FnMut(T) -> bool) -> impl FnMut(&T) -> bool + '_ {
|
||||||
|
move |&item| predicate(item)
|
||||||
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let mut u = 0;
|
let mut u = 0;
|
||||||
let mut v = vec![0];
|
let mut v = vec![0];
|
||||||
|
Loading…
Reference in New Issue
Block a user