]> git.lizzy.rs Git - rust.git/blob - src/test/ui/closure-expected-type/expect-fn-supply-fn.nll.stderr
Change NLL compare mode to borrowck=migrate.
[rust.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:40:5
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 `for<'a, 'r> fn(fn(&'a u32), &'r i32) -> _`
8    |
9 note: required by `with_closure_expecting_fn_with_free_region`
10   --> $DIR/expect-fn-supply-fn.rs:11:1
11    |
12 LL | / fn with_closure_expecting_fn_with_free_region<F>(_: F)
13 LL | |     where F: for<'a> FnOnce(fn(&'a u32), &i32)
14 LL | | {
15 LL | | }
16    | |_^
17
18 error[E0631]: type mismatch in closure arguments
19   --> $DIR/expect-fn-supply-fn.rs:47:5
20    |
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 `for<'r> fn(for<'s> fn(&'s u32), &'r i32) -> _`
25    |
26 note: required by `with_closure_expecting_fn_with_bound_region`
27   --> $DIR/expect-fn-supply-fn.rs:16:1
28    |
29 LL | / fn with_closure_expecting_fn_with_bound_region<F>(_: F)
30 LL | |     where F: FnOnce(fn(&u32), &i32)
31 LL | | {
32 LL | | }
33    | |_^
34
35 error[E0631]: type mismatch in closure arguments
36   --> $DIR/expect-fn-supply-fn.rs:56:5
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 `for<'r> fn(for<'s> fn(&'s u32), &'r i32) -> _`
42    |
43 note: required by `with_closure_expecting_fn_with_bound_region`
44   --> $DIR/expect-fn-supply-fn.rs:16:1
45    |
46 LL | / fn with_closure_expecting_fn_with_bound_region<F>(_: F)
47 LL | |     where F: FnOnce(fn(&u32), &i32)
48 LL | | {
49 LL | | }
50    | |_^
51
52 error: aborting due to 3 previous errors
53
54 For more information about this error, try `rustc --explain E0631`.