blob: 1a82dd53edc702964396823b5e4dad154b1b7353 [file] [log] [blame]
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, F>(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, F>(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