1error[E0631]: type mismatch in function arguments
2  --> $DIR/fn-variance-1.rs:11:15
3   |
4LL | fn takes_mut(x: &mut isize) { }
5   | --------------------------- found signature of `for<'r> fn(&'r mut isize) -> _`
6...
7LL |     apply(&3, takes_mut);
8   |     -----     ^^^^^^^^^ expected signature of `fn(&{integer}) -> _`
9   |     |
10   |     required by a bound introduced by this call
11   |
12note: required by a bound in `apply`
13  --> $DIR/fn-variance-1.rs:5:37
14   |
15LL | fn apply<T, F>(t: T, f: F) where F: FnOnce(T) {
16   |                                     ^^^^^^^^^ required by this bound in `apply`
17
18error[E0631]: type mismatch in function arguments
19  --> $DIR/fn-variance-1.rs:15:19
20   |
21LL | fn takes_imm(x: &isize) { }
22   | ----------------------- found signature of `for<'r> fn(&'r isize) -> _`
23...
24LL |     apply(&mut 3, takes_imm);
25   |     -----         ^^^^^^^^^ expected signature of `fn(&mut {integer}) -> _`
26   |     |
27   |     required by a bound introduced by this call
28   |
29note: required by a bound in `apply`
30  --> $DIR/fn-variance-1.rs:5:37
31   |
32LL | fn apply<T, F>(t: T, f: F) where F: FnOnce(T) {
33   |                                     ^^^^^^^^^ required by this bound in `apply`
34
35error: aborting due to 2 previous errors
36
37For more information about this error, try `rustc --explain E0631`.
38