]> git.proxmox.com Git - rustc.git/blame - src/test/ui/unboxed-closures/unboxed-closures-type-mismatch.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / unboxed-closures / unboxed-closures-type-mismatch.stderr
CommitLineData
b7449926 1error[E0308]: mismatched types
0731742a 2 --> $DIR/unboxed-closures-type-mismatch.rs:5:15
b7449926 3 |
532ac7d7 4LL | let z = f(1_usize, 2);
923072b8
FG
5 | - ^^^^^^^ expected `isize`, found `usize`
6 | |
7 | arguments to this function are incorrect
e74abb32 8 |
923072b8
FG
9note: closure defined here
10 --> $DIR/unboxed-closures-type-mismatch.rs:4:17
11 |
12LL | let mut f = |x: isize, y: isize| -> isize { x + y };
13 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
48663c56
XL
14help: change the type of the numeric literal from `usize` to `isize`
15 |
16LL | let z = f(1_isize, 2);
c295e0f8 17 | ~~~~~
b7449926
XL
18
19error: aborting due to previous error
20
21For more information about this error, try `rustc --explain E0308`.