1 error[E0631]: type mismatch in closure arguments
2 --> $DIR/expect-fn-supply-fn.rs:40:5
4 LL | with_closure_expecting_fn_with_free_region(|x: fn(&u32), y| {});
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ---------------- found signature of `fn(for<'r> fn(&'r u32), _) -> _`
7 | expected signature of `for<'a, 'r> fn(fn(&'a u32), &'r i32) -> _`
9 note: required by `with_closure_expecting_fn_with_free_region`
10 --> $DIR/expect-fn-supply-fn.rs:11:1
12 LL | / fn with_closure_expecting_fn_with_free_region<F>(_: F)
13 LL | | where F: for<'a> FnOnce(fn(&'a u32), &i32)
18 error[E0631]: type mismatch in closure arguments
19 --> $DIR/expect-fn-supply-fn.rs:47:5
21 LL | with_closure_expecting_fn_with_bound_region(|x: fn(&'x u32), y| {});
22 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ------------------- found signature of `fn(fn(&'x u32), _) -> _`
24 | expected signature of `for<'r> fn(for<'s> fn(&'s u32), &'r i32) -> _`
26 note: required by `with_closure_expecting_fn_with_bound_region`
27 --> $DIR/expect-fn-supply-fn.rs:16:1
29 LL | / fn with_closure_expecting_fn_with_bound_region<F>(_: F)
30 LL | | where F: FnOnce(fn(&u32), &i32)
35 error[E0631]: type mismatch in closure arguments
36 --> $DIR/expect-fn-supply-fn.rs:56:5
38 LL | with_closure_expecting_fn_with_bound_region(|_x: Foo<'_>, y| {});
39 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ---------------- found signature of `for<'r> fn(fn(&'r u32), _) -> _`
41 | expected signature of `for<'r> fn(for<'s> fn(&'s u32), &'r i32) -> _`
43 note: required by `with_closure_expecting_fn_with_bound_region`
44 --> $DIR/expect-fn-supply-fn.rs:16:1
46 LL | / fn with_closure_expecting_fn_with_bound_region<F>(_: F)
47 LL | | where F: FnOnce(fn(&u32), &i32)
52 error: aborting due to 3 previous errors
54 For more information about this error, try `rustc --explain E0631`.