blob: 455f83f5721bdfbb7a7f7974bfe15a3a47fe82fe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
error[E0308]: mismatched types
--> $DIR/unboxed-closures-type-mismatch.rs:5:15
|
LL | let z = f(1_usize, 2);
| - ^^^^^^^ expected `isize`, found `usize`
| |
| arguments to this function are incorrect
|
note: closure parameter defined here
--> $DIR/unboxed-closures-type-mismatch.rs:4:18
|
LL | let mut f = |x: isize, y: isize| -> isize { x + y };
| ^^^^^^^^
help: change the type of the numeric literal from `usize` to `isize`
|
LL | let z = f(1_isize, 2);
| ~~~~~
error: aborting due to previous error
For more information about this error, try `rustc --explain E0308`.
|