]>
Commit | Line | Data |
---|---|---|
8faf50e0 | 1 | error[E0308]: mismatched types |
0731742a | 2 | --> $DIR/issue-13359.rs:6:9 |
8faf50e0 XL |
3 | | |
4 | LL | foo(1*(1 as isize)); | |
923072b8 FG |
5 | | --- ^^^^^^^^^^^^^^ expected `i16`, found `isize` |
6 | | | | |
7 | | arguments to this function are incorrect | |
e74abb32 | 8 | | |
923072b8 FG |
9 | note: function defined here |
10 | --> $DIR/issue-13359.rs:1:4 | |
11 | | | |
12 | LL | fn foo(_s: i16) { } | |
13 | | ^^^ ------- | |
29967ef6 | 14 | help: you can convert an `isize` to an `i16` and panic if the converted value doesn't fit |
48663c56 XL |
15 | | |
16 | LL | foo((1*(1 as isize)).try_into().unwrap()); | |
c295e0f8 | 17 | | + +++++++++++++++++++++ |
8faf50e0 XL |
18 | |
19 | error[E0308]: mismatched types | |
0731742a | 20 | --> $DIR/issue-13359.rs:10:9 |
8faf50e0 XL |
21 | | |
22 | LL | bar(1*(1 as usize)); | |
923072b8 FG |
23 | | --- ^^^^^^^^^^^^^^ expected `u32`, found `usize` |
24 | | | | |
25 | | arguments to this function are incorrect | |
26 | | | |
27 | note: function defined here | |
28 | --> $DIR/issue-13359.rs:3:4 | |
e74abb32 | 29 | | |
923072b8 FG |
30 | LL | fn bar(_s: u32) { } |
31 | | ^^^ ------- | |
29967ef6 | 32 | help: you can convert a `usize` to a `u32` and panic if the converted value doesn't fit |
48663c56 XL |
33 | | |
34 | LL | bar((1*(1 as usize)).try_into().unwrap()); | |
c295e0f8 | 35 | | + +++++++++++++++++++++ |
8faf50e0 XL |
36 | |
37 | error: aborting due to 2 previous errors | |
38 | ||
39 | For more information about this error, try `rustc --explain E0308`. |