]> git.lizzy.rs Git - rust.git/blob - src/test/ui/closures/multiple-fn-bounds.stderr
Auto merge of #102724 - pcc:scs-fix-test, r=Mark-Simulacrum
[rust.git] / src / test / ui / closures / multiple-fn-bounds.stderr
1 error[E0631]: type mismatch in closure arguments
2   --> $DIR/multiple-fn-bounds.rs:10:5
3    |
4 LL |     foo(move |x| v);
5    |     ^^^ -------- found signature defined here
6    |     |
7    |     expected due to this
8    |
9    = note: expected closure signature `fn(char) -> _`
10               found closure signature `for<'a> fn(&'a char) -> _`
11 note: closure inferred to have a different signature due to this bound
12   --> $DIR/multiple-fn-bounds.rs:1:11
13    |
14 LL | fn foo<F: Fn(&char) -> bool + Fn(char) -> bool>(f: F) {
15    |           ^^^^^^^^^^^^^^^^^
16 note: required by a bound in `foo`
17   --> $DIR/multiple-fn-bounds.rs:1:31
18    |
19 LL | fn foo<F: Fn(&char) -> bool + Fn(char) -> bool>(f: F) {
20    |                               ^^^^^^^^^^^^^^^^ required by this bound in `foo`
21
22 error: aborting due to previous error
23
24 For more information about this error, try `rustc --explain E0631`.