]> git.lizzy.rs Git - rust.git/blob - tests/ui/closures/multiple-fn-bounds.stderr
Rollup merge of #106563 - clubby789:gce-macro-braces, r=TaKO8Ki
[rust.git] / tests / 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    |     ^^^ --------
6    |     |   |     |
7    |     |   |     help: do not borrow the argument: `char`
8    |     |   found signature defined here
9    |     expected due to this
10    |
11    = note: expected closure signature `fn(char) -> _`
12               found closure signature `for<'a> fn(&'a char) -> _`
13 note: closure inferred to have a different signature due to this bound
14   --> $DIR/multiple-fn-bounds.rs:1:11
15    |
16 LL | fn foo<F: Fn(&char) -> bool + Fn(char) -> bool>(f: F) {
17    |           ^^^^^^^^^^^^^^^^^
18 note: required by a bound in `foo`
19   --> $DIR/multiple-fn-bounds.rs:1:31
20    |
21 LL | fn foo<F: Fn(&char) -> bool + Fn(char) -> bool>(f: F) {
22    |                               ^^^^^^^^^^^^^^^^ required by this bound in `foo`
23
24 error: aborting due to previous error
25
26 For more information about this error, try `rustc --explain E0631`.