|
1 | 1 | error[E0631]: type mismatch in closure arguments
|
2 | 2 | --> $DIR/expect-fn-supply-fn.rs:30:5
|
3 | 3 | |
|
4 |
| -LL | / fn with_closure_expecting_fn_with_free_region<F>(_: F) |
5 |
| -LL | | where F: for<'a> FnOnce(fn(&'a u32), &i32) |
6 |
| -LL | | { |
7 |
| -LL | | } |
8 |
| - | |_- required by `with_closure_expecting_fn_with_free_region` |
| 4 | +LL | fn with_closure_expecting_fn_with_free_region<F>(_: F) |
| 5 | + | ------------------------------------------ |
| 6 | +LL | where F: for<'a> FnOnce(fn(&'a u32), &i32) |
| 7 | + | ------------------------- required by this bound in `with_closure_expecting_fn_with_free_region` |
9 | 8 | ...
|
10 |
| -LL | with_closure_expecting_fn_with_free_region(|x: fn(&u32), y| {}); |
11 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ---------------- found signature of `fn(for<'r> fn(&'r u32), _) -> _` |
12 |
| - | | |
13 |
| - | expected signature of `fn(fn(&'a u32), &i32) -> _` |
| 9 | +LL | with_closure_expecting_fn_with_free_region(|x: fn(&u32), y| {}); |
| 10 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ---------------- found signature of `fn(for<'r> fn(&'r u32), _) -> _` |
| 11 | + | | |
| 12 | + | expected signature of `fn(fn(&'a u32), &i32) -> _` |
14 | 13 |
|
15 | 14 | error[E0631]: type mismatch in closure arguments
|
16 | 15 | --> $DIR/expect-fn-supply-fn.rs:37:5
|
17 | 16 | |
|
18 |
| -LL | / fn with_closure_expecting_fn_with_bound_region<F>(_: F) |
19 |
| -LL | | where F: FnOnce(fn(&u32), &i32) |
20 |
| -LL | | { |
21 |
| -LL | | } |
22 |
| - | |_- required by `with_closure_expecting_fn_with_bound_region` |
| 17 | +LL | fn with_closure_expecting_fn_with_bound_region<F>(_: F) |
| 18 | + | ------------------------------------------- |
| 19 | +LL | where F: FnOnce(fn(&u32), &i32) |
| 20 | + | ---------------------- required by this bound in `with_closure_expecting_fn_with_bound_region` |
23 | 21 | ...
|
24 |
| -LL | with_closure_expecting_fn_with_bound_region(|x: fn(&'x u32), y| {}); |
25 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ------------------- found signature of `fn(fn(&'x u32), _) -> _` |
26 |
| - | | |
27 |
| - | expected signature of `fn(for<'r> fn(&'r u32), &i32) -> _` |
| 22 | +LL | with_closure_expecting_fn_with_bound_region(|x: fn(&'x u32), y| {}); |
| 23 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ------------------- found signature of `fn(fn(&'x u32), _) -> _` |
| 24 | + | | |
| 25 | + | expected signature of `fn(for<'r> fn(&'r u32), &i32) -> _` |
28 | 26 |
|
29 | 27 | error[E0631]: type mismatch in closure arguments
|
30 | 28 | --> $DIR/expect-fn-supply-fn.rs:46:5
|
31 | 29 | |
|
32 |
| -LL | / fn with_closure_expecting_fn_with_bound_region<F>(_: F) |
33 |
| -LL | | where F: FnOnce(fn(&u32), &i32) |
34 |
| -LL | | { |
35 |
| -LL | | } |
36 |
| - | |_- required by `with_closure_expecting_fn_with_bound_region` |
| 30 | +LL | fn with_closure_expecting_fn_with_bound_region<F>(_: F) |
| 31 | + | ------------------------------------------- |
| 32 | +LL | where F: FnOnce(fn(&u32), &i32) |
| 33 | + | ---------------------- required by this bound in `with_closure_expecting_fn_with_bound_region` |
37 | 34 | ...
|
38 |
| -LL | with_closure_expecting_fn_with_bound_region(|x: Foo<'_>, y| { |
39 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ --------------- found signature of `for<'r> fn(fn(&'r u32), _) -> _` |
40 |
| - | | |
41 |
| - | expected signature of `fn(for<'r> fn(&'r u32), &i32) -> _` |
| 35 | +LL | with_closure_expecting_fn_with_bound_region(|x: Foo<'_>, y| { |
| 36 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ --------------- found signature of `for<'r> fn(fn(&'r u32), _) -> _` |
| 37 | + | | |
| 38 | + | expected signature of `fn(for<'r> fn(&'r u32), &i32) -> _` |
42 | 39 |
|
43 | 40 | error: aborting due to 3 previous errors
|
44 | 41 |
|
0 commit comments