We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b4b07c commit 3e6db95Copy full SHA for 3e6db95
tests/ui/needless_pass_by_ref_mut.rs
@@ -297,6 +297,11 @@ fn true_setter(b: &mut bool) -> impl FnOnce() + '_ {
297
move || set_true(b)
298
}
299
300
+// Should not warn.
301
+fn filter_copy<T: Copy>(predicate: &mut impl FnMut(T) -> bool) -> impl FnMut(&T) -> bool + '_ {
302
+ move |&item| predicate(item)
303
+}
304
+
305
fn main() {
306
let mut u = 0;
307
let mut v = vec![0];
0 commit comments