]>
Commit | Line | Data |
---|---|---|
48663c56 XL |
1 | error[E0308]: mismatched types |
2 | --> $DIR/len.rs:3:10 | |
3 | | | |
4 | LL | test(array.len()); | |
923072b8 FG |
5 | | ---- ^^^^^^^^^^^ expected `u32`, found `usize` |
6 | | | | |
7 | | arguments to this function are incorrect | |
e74abb32 | 8 | | |
923072b8 FG |
9 | note: function defined here |
10 | --> $DIR/len.rs:6:4 | |
11 | | | |
12 | LL | fn test(length: u32) { | |
13 | | ^^^^ ----------- | |
29967ef6 | 14 | help: you can convert a `usize` to a `u32` and panic if the converted value doesn't fit |
48663c56 XL |
15 | | |
16 | LL | test(array.len().try_into().unwrap()); | |
c295e0f8 | 17 | | ++++++++++++++++++++ |
48663c56 XL |
18 | |
19 | error: aborting due to previous error | |
20 | ||
21 | For more information about this error, try `rustc --explain E0308`. |