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