blob: fe857001bfaefc35eecfe7c6bf7a99fb002d3482 [file] [log] [blame]
warning: not reporting region error due to nll
--> $DIR/expect-fn-supply-fn.rs:24:52
|
LL | with_closure_expecting_fn_with_free_region(|x: fn(&'x u32), y| {});
| ^^^^^^^^^^^
error[E0631]: type mismatch in closure arguments
--> $DIR/expect-fn-supply-fn.rs:40:5
|
LL | with_closure_expecting_fn_with_free_region(|x: fn(&u32), y| {});
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ---------------- found signature of `fn(for<'r> fn(&'r u32), _) -> _`
| |
| expected signature of `for<'a, 'r> fn(fn(&'a u32), &'r i32) -> _`
|
note: required by `with_closure_expecting_fn_with_free_region`
--> $DIR/expect-fn-supply-fn.rs:11:1
|
LL | / fn with_closure_expecting_fn_with_free_region<F>(_: F)
LL | | where F: for<'a> FnOnce(fn(&'a u32), &i32)
LL | | {
LL | | }
| |_^
error[E0631]: type mismatch in closure arguments
--> $DIR/expect-fn-supply-fn.rs:47:5
|
LL | with_closure_expecting_fn_with_bound_region(|x: fn(&'x u32), y| {});
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ------------------- found signature of `fn(fn(&'x u32), _) -> _`
| |
| expected signature of `for<'r> fn(for<'s> fn(&'s u32), &'r i32) -> _`
|
note: required by `with_closure_expecting_fn_with_bound_region`
--> $DIR/expect-fn-supply-fn.rs:16:1
|
LL | / fn with_closure_expecting_fn_with_bound_region<F>(_: F)
LL | | where F: FnOnce(fn(&u32), &i32)
LL | | {
LL | | }
| |_^
error[E0631]: type mismatch in closure arguments
--> $DIR/expect-fn-supply-fn.rs:56:5
|
LL | with_closure_expecting_fn_with_bound_region(|_x: Foo<'_>, y| {});
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ---------------- found signature of `for<'r> fn(fn(&'r u32), _) -> _`
| |
| expected signature of `for<'r> fn(for<'s> fn(&'s u32), &'r i32) -> _`
|
note: required by `with_closure_expecting_fn_with_bound_region`
--> $DIR/expect-fn-supply-fn.rs:16:1
|
LL | / fn with_closure_expecting_fn_with_bound_region<F>(_: F)
LL | | where F: FnOnce(fn(&u32), &i32)
LL | | {
LL | | }
| |_^
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0631`.