1 // Some cases with closures that might be problems
3 // Should have one error per assignment
5 fn one_closure(x: i32) {
12 fn two_closures(x: i32) {
23 fn fn_ref<F: Fn()>(f: F) -> F { f }
25 fn two_closures_ref_mut(mut x: i32) {
35 // This still gives two messages, but it requires two things to be fixed.
36 fn two_closures_ref(x: i32) {
46 fn two_closures_two_refs(x: &mut i32) {