mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 07:00:55 +00:00
Add regression test for #11561
This commit is contained in:
parent
3b4b07c5f8
commit
3e6db95e30
1 changed files with 5 additions and 0 deletions
|
@ -297,6 +297,11 @@ fn true_setter(b: &mut bool) -> impl FnOnce() + '_ {
|
|||
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() {
|
||||
let mut u = 0;
|
||||
let mut v = vec![0];
|
||||
|
|
Loading…
Reference in a new issue