forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
24 additions
and
37 deletions.
There are no files selected for viewing
45 changes: 18 additions & 27 deletions
45
src/test/ui/closure-expected-type/expect-fn-supply-fn.nll.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,44 @@ | ||
error[E0631]: type mismatch in closure arguments | ||
--> $DIR/expect-fn-supply-fn.rs:30: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 `fn(fn(&'a u32), &i32) -> _` | ||
| | ||
note: required by `with_closure_expecting_fn_with_free_region` | ||
--> $DIR/expect-fn-supply-fn.rs:1:1 | ||
| | ||
LL | / fn with_closure_expecting_fn_with_free_region<F>(_: F) | ||
LL | | where F: for<'a> FnOnce(fn(&'a u32), &i32) | ||
LL | | { | ||
LL | | } | ||
| |_^ | ||
| |_- required by `with_closure_expecting_fn_with_free_region` | ||
... | ||
LL | with_closure_expecting_fn_with_free_region(|x: fn(&u32), y| {}); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ---------------- found signature of `fn(for<'r> fn(&'r u32), _) -> _` | ||
| | | ||
| expected signature of `fn(fn(&'a u32), &i32) -> _` | ||
|
||
error[E0631]: type mismatch in closure arguments | ||
--> $DIR/expect-fn-supply-fn.rs:37:5 | ||
| | ||
LL | with_closure_expecting_fn_with_bound_region(|x: fn(&'x u32), y| {}); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ------------------- found signature of `fn(fn(&'x u32), _) -> _` | ||
| | | ||
| expected signature of `fn(for<'r> fn(&'r u32), &i32) -> _` | ||
| | ||
note: required by `with_closure_expecting_fn_with_bound_region` | ||
--> $DIR/expect-fn-supply-fn.rs:6:1 | ||
| | ||
LL | / fn with_closure_expecting_fn_with_bound_region<F>(_: F) | ||
LL | | where F: FnOnce(fn(&u32), &i32) | ||
LL | | { | ||
LL | | } | ||
| |_^ | ||
| |_- required by `with_closure_expecting_fn_with_bound_region` | ||
... | ||
LL | with_closure_expecting_fn_with_bound_region(|x: fn(&'x u32), y| {}); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ------------------- found signature of `fn(fn(&'x u32), _) -> _` | ||
| | | ||
| expected signature of `fn(for<'r> fn(&'r u32), &i32) -> _` | ||
|
||
error[E0631]: type mismatch in closure arguments | ||
--> $DIR/expect-fn-supply-fn.rs:46:5 | ||
| | ||
LL | with_closure_expecting_fn_with_bound_region(|x: Foo<'_>, y| { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ --------------- found signature of `for<'r> fn(fn(&'r u32), _) -> _` | ||
| | | ||
| expected signature of `fn(for<'r> fn(&'r u32), &i32) -> _` | ||
| | ||
note: required by `with_closure_expecting_fn_with_bound_region` | ||
--> $DIR/expect-fn-supply-fn.rs:6:1 | ||
| | ||
LL | / fn with_closure_expecting_fn_with_bound_region<F>(_: F) | ||
LL | | where F: FnOnce(fn(&u32), &i32) | ||
LL | | { | ||
LL | | } | ||
| |_^ | ||
| |_- required by `with_closure_expecting_fn_with_bound_region` | ||
... | ||
LL | with_closure_expecting_fn_with_bound_region(|x: Foo<'_>, y| { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ --------------- found signature of `for<'r> fn(fn(&'r u32), _) -> _` | ||
| | | ||
| expected signature of `fn(for<'r> fn(&'r u32), &i32) -> _` | ||
|
||
error: aborting due to 3 previous errors | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters