error[E0631]: type mismatch in function arguments --> $DIR/fn-variance-1.rs:11:15 | LL | fn takes_mut(x: &mut isize) { } | --------------------------- found signature of `for<'r> fn(&'r mut isize) -> _` LL | LL | fn apply(t: T, f: F) where F: FnOnce(T) { | --------- required by this bound in `apply` ... LL | apply(&3, takes_mut); | ^^^^^^^^^ expected signature of `fn(&{integer}) -> _` error[E0631]: type mismatch in function arguments --> $DIR/fn-variance-1.rs:15:19 | LL | fn takes_imm(x: &isize) { } | ----------------------- found signature of `for<'r> fn(&'r isize) -> _` ... LL | fn apply(t: T, f: F) where F: FnOnce(T) { | --------- required by this bound in `apply` ... LL | apply(&mut 3, takes_imm); | ^^^^^^^^^ expected signature of `fn(&mut {integer}) -> _` error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0631`.