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