fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

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