]> git.proxmox.com Git - rustc.git/blob - src/test/ui/closure-expected-type/expect-fn-supply-fn.nll.stderr
New upstream version 1.39.0+dfsg1
[rustc.git] / src / test / ui / closure-expected-type / expect-fn-supply-fn.nll.stderr
1 error[E0631]: type mismatch in closure arguments
2 --> $DIR/expect-fn-supply-fn.rs:30:5
3 |
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`
8 ...
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) -> _`
13
14 error[E0631]: type mismatch in closure arguments
15 --> $DIR/expect-fn-supply-fn.rs:37:5
16 |
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`
21 ...
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) -> _`
26
27 error[E0631]: type mismatch in closure arguments
28 --> $DIR/expect-fn-supply-fn.rs:46:5
29 |
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`
34 ...
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) -> _`
39
40 error: aborting due to 3 previous errors
41