rust/src/test/ui/array-not-vector.stderr

22 lines
591 B
Plaintext
Raw Normal View History

2018-08-08 07:28:26 -05:00
error[E0308]: mismatched types
2018-12-25 09:56:47 -06:00
--> $DIR/array-not-vector.rs:2:19
2018-08-08 07:28:26 -05:00
|
LL | let _x: i32 = [1, 2, 3];
| ^^^^^^^^^ expected i32, found array of 3 elements
|
= note: expected type `i32`
found type `[{integer}; 3]`
error[E0308]: mismatched types
2018-12-25 09:56:47 -06:00
--> $DIR/array-not-vector.rs:9:20
2018-08-08 07:28:26 -05:00
|
LL | let _y: &i32 = x;
| ^ expected i32, found slice
|
= note: expected type `&i32`
found type `&[i32]`
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0308`.