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