rust/tests/ui/inference/array-len-mismatch.stderr

22 lines
850 B
Plaintext

error[E0308]: mismatched types
--> $DIR/array-len-mismatch.rs:6:26
|
LL | let wrong: [u8; 3] = [10, 20];
| ------- ^^^^^^^^ expected an array with a size of 3, found one with a size of 2
| | |
| | help: consider specifying the actual array length: `2`
| expected due to this
error[E0308]: mismatched types
--> $DIR/array-len-mismatch.rs:9:26
|
LL | let wrong: [u8; 3] = returns_arr();
| ------- ^^^^^^^^^^^^^ expected an array with a size of 3, found one with a size of 2
| | |
| | help: consider specifying the actual array length: `2`
| expected due to this
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0308`.