]> git.lizzy.rs Git - rust.git/blob - src/test/ui/mismatched_types/fn-variance-1.stderr
Merge commit 'bf1c6f9871f430e284b17aa44059e0d0395e28a6' into clippyup
[rust.git] / src / test / ui / mismatched_types / fn-variance-1.stderr
1 error[E0631]: type mismatch in function arguments
2   --> $DIR/fn-variance-1.rs:11:15
3    |
4 LL | fn takes_mut(x: &mut isize) { }
5    | --------------------------- found signature of `for<'r> fn(&'r mut isize) -> _`
6 LL | 
7 LL | fn apply<T, F>(t: T, f: F) where F: FnOnce(T) {
8    |                                     --------- required by this bound in `apply`
9 ...
10 LL |     apply(&3, takes_mut);
11    |               ^^^^^^^^^ expected signature of `fn(&{integer}) -> _`
12
13 error[E0631]: type mismatch in function arguments
14   --> $DIR/fn-variance-1.rs:15:19
15    |
16 LL | fn takes_imm(x: &isize) { }
17    | ----------------------- found signature of `for<'r> fn(&'r isize) -> _`
18 ...
19 LL | fn apply<T, F>(t: T, f: F) where F: FnOnce(T) {
20    |                                     --------- required by this bound in `apply`
21 ...
22 LL |     apply(&mut 3, takes_imm);
23    |                   ^^^^^^^^^ expected signature of `fn(&mut {integer}) -> _`
24
25 error: aborting due to 2 previous errors
26
27 For more information about this error, try `rustc --explain E0631`.