]> git.lizzy.rs Git - rust.git/blob - src/test/ui/numeric/len.stderr
Add test
[rust.git] / src / test / ui / numeric / len.stderr
1 error[E0308]: mismatched types
2   --> $DIR/len.rs:3:10
3    |
4 LL |     test(array.len());
5    |          ^^^^^^^^^^^ expected u32, found usize
6 help: you can convert an `usize` to `u32` or panic if it the converted value wouldn't fit
7    |
8 LL |     test(array.len().try_into().unwrap());
9    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10
11 error: aborting due to previous error
12
13 For more information about this error, try `rustc --explain E0308`.