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