rust/tests/ui/closure-expected-type/expect-infer-var-appearing-twice.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
818 B
Plaintext
Raw Normal View History

2018-08-08 12:28:26 +00:00
error[E0631]: type mismatch in closure arguments
2018-12-25 15:56:47 +00:00
--> $DIR/expect-infer-var-appearing-twice.rs:14:5
2018-08-08 12:28:26 +00:00
|
LL | with_closure(|x: u32, y: i32| {
| ^ ---------------- found signature defined here
| _____|
| |
LL | |
LL | | });
| |______^ expected due to this
|
= note: expected closure signature `fn(_, u32) -> _`
found closure signature `fn(_, i32) -> _`
note: required by a bound in `with_closure`
--> $DIR/expect-infer-var-appearing-twice.rs:2:14
|
LL | fn with_closure<F, A>(_: F)
2023-02-21 05:21:07 +00:00
| ------------ required by a bound in this function
LL | where F: FnOnce(A, A)
| ^^^^^^^^^^^^ required by this bound in `with_closure`
2018-08-08 12:28:26 +00:00
error: aborting due to 1 previous error
2018-08-08 12:28:26 +00:00
For more information about this error, try `rustc --explain E0631`.