]> git.proxmox.com Git - rustc.git/blame - src/test/ui/unboxed-closures/unboxed-closures-unsafe-extern-fn.stderr
New upstream version 1.39.0+dfsg1
[rustc.git] / src / test / ui / unboxed-closures / unboxed-closures-unsafe-extern-fn.stderr
CommitLineData
b7449926 1error[E0277]: expected a `std::ops::Fn<(&isize,)>` closure, found `for<'r> unsafe fn(&'r isize) -> isize {square}`
e1599b0c 2 --> $DIR/unboxed-closures-unsafe-extern-fn.rs:12:21
b7449926 3 |
e1599b0c
XL
4LL | fn call_it<F:Fn(&isize)->isize>(_: &F, _: isize) -> isize { 0 }
5 | ------- ----------------- required by this bound in `call_it`
6...
b7449926 7LL | let x = call_it(&square, 22);
e1599b0c 8 | ^^^^^^^ expected an `Fn<(&isize,)>` closure, found `for<'r> unsafe fn(&'r isize) -> isize {square}`
b7449926
XL
9 |
10 = help: the trait `for<'r> std::ops::Fn<(&'r isize,)>` is not implemented for `for<'r> unsafe fn(&'r isize) -> isize {square}`
0731742a
XL
11
12error[E0277]: expected a `std::ops::FnOnce<(&isize,)>` closure, found `for<'r> unsafe fn(&'r isize) -> isize {square}`
e1599b0c 13 --> $DIR/unboxed-closures-unsafe-extern-fn.rs:12:21
0731742a 14 |
e1599b0c
XL
15LL | fn call_it<F:Fn(&isize)->isize>(_: &F, _: isize) -> isize { 0 }
16 | ------- ----- required by this bound in `call_it`
17...
0731742a 18LL | let x = call_it(&square, 22);
e1599b0c 19 | ^^^^^^^ expected an `FnOnce<(&isize,)>` closure, found `for<'r> unsafe fn(&'r isize) -> isize {square}`
0731742a
XL
20 |
21 = help: the trait `std::ops::FnOnce<(&isize,)>` is not implemented for `for<'r> unsafe fn(&'r isize) -> isize {square}`
b7449926
XL
22
23error[E0277]: expected a `std::ops::FnMut<(&isize,)>` closure, found `for<'r> unsafe fn(&'r isize) -> isize {square}`
e1599b0c 24 --> $DIR/unboxed-closures-unsafe-extern-fn.rs:18:25
b7449926 25 |
e1599b0c
XL
26LL | fn call_it_mut<F:FnMut(&isize)->isize>(_: &mut F, _: isize) -> isize { 0 }
27 | ----------- -------------------- required by this bound in `call_it_mut`
28...
b7449926 29LL | let y = call_it_mut(&mut square, 22);
e1599b0c 30 | ^^^^^^^^^^^ expected an `FnMut<(&isize,)>` closure, found `for<'r> unsafe fn(&'r isize) -> isize {square}`
b7449926
XL
31 |
32 = help: the trait `for<'r> std::ops::FnMut<(&'r isize,)>` is not implemented for `for<'r> unsafe fn(&'r isize) -> isize {square}`
0731742a
XL
33
34error[E0277]: expected a `std::ops::FnOnce<(&isize,)>` closure, found `for<'r> unsafe fn(&'r isize) -> isize {square}`
e1599b0c 35 --> $DIR/unboxed-closures-unsafe-extern-fn.rs:18:25
0731742a 36 |
e1599b0c
XL
37LL | fn call_it_mut<F:FnMut(&isize)->isize>(_: &mut F, _: isize) -> isize { 0 }
38 | ----------- ----- required by this bound in `call_it_mut`
39...
0731742a 40LL | let y = call_it_mut(&mut square, 22);
e1599b0c 41 | ^^^^^^^^^^^ expected an `FnOnce<(&isize,)>` closure, found `for<'r> unsafe fn(&'r isize) -> isize {square}`
0731742a
XL
42 |
43 = help: the trait `std::ops::FnOnce<(&isize,)>` is not implemented for `for<'r> unsafe fn(&'r isize) -> isize {square}`
b7449926
XL
44
45error[E0277]: expected a `std::ops::FnOnce<(&isize,)>` closure, found `for<'r> unsafe fn(&'r isize) -> isize {square}`
e1599b0c 46 --> $DIR/unboxed-closures-unsafe-extern-fn.rs:24:26
b7449926 47 |
e1599b0c
XL
48LL | fn call_it_once<F:FnOnce(&isize)->isize>(_: F, _: isize) -> isize { 0 }
49 | ------------ ----- required by this bound in `call_it_once`
50...
b7449926 51LL | let z = call_it_once(square, 22);
e1599b0c 52 | ^^^^^^ expected an `FnOnce<(&isize,)>` closure, found `for<'r> unsafe fn(&'r isize) -> isize {square}`
b7449926 53 |
0731742a 54 = help: the trait `std::ops::FnOnce<(&isize,)>` is not implemented for `for<'r> unsafe fn(&'r isize) -> isize {square}`
b7449926 55
0731742a 56error: aborting due to 5 previous errors
b7449926
XL
57
58For more information about this error, try `rustc --explain E0277`.