]>
Commit | Line | Data |
---|---|---|
ea8adc8c | 1 | error[E0631]: type mismatch in function arguments |
e1599b0c | 2 | --> $DIR/fn-variance-1.rs:11:15 |
7cac9316 | 3 | | |
0531ce1d | 4 | LL | fn takes_mut(x: &mut isize) { } |
ff7c6d11 | 5 | | --------------------------- found signature of `for<'r> fn(&'r mut isize) -> _` |
e1599b0c XL |
6 | LL | |
7 | LL | fn apply<T, F>(t: T, f: F) where F: FnOnce(T) { | |
8 | | ----- --------- required by this bound in `apply` | |
ff7c6d11 | 9 | ... |
0531ce1d | 10 | LL | apply(&3, takes_mut); |
e1599b0c | 11 | | ^^^^^^^^^ expected signature of `fn(&{integer}) -> _` |
7cac9316 | 12 | |
ea8adc8c | 13 | error[E0631]: type mismatch in function arguments |
e1599b0c | 14 | --> $DIR/fn-variance-1.rs:15:19 |
7cac9316 | 15 | | |
0531ce1d | 16 | LL | fn takes_imm(x: &isize) { } |
ff7c6d11 XL |
17 | | ----------------------- found signature of `for<'r> fn(&'r isize) -> _` |
18 | ... | |
0531ce1d | 19 | LL | fn apply<T, F>(t: T, f: F) where F: FnOnce(T) { |
e1599b0c XL |
20 | | ----- --------- required by this bound in `apply` |
21 | ... | |
22 | LL | apply(&mut 3, takes_imm); | |
23 | | ^^^^^^^^^ expected signature of `fn(&mut {integer}) -> _` | |
7cac9316 | 24 | |
041b39d2 | 25 | error: aborting due to 2 previous errors |
7cac9316 | 26 | |
60c5eb7d | 27 | For more information about this error, try `rustc --explain E0631`. |