]> git.lizzy.rs Git - rust.git/blob - src/test/ui/array-not-vector.stderr
Rollup merge of #61207 - taiki-e:arbitrary_self_types-lifetime-elision-2, r=Centril
[rust.git] / src / test / ui / array-not-vector.stderr
1 error[E0308]: mismatched types
2   --> $DIR/array-not-vector.rs:2:19
3    |
4 LL |     let _x: i32 = [1, 2, 3];
5    |                   ^^^^^^^^^ expected i32, found array of 3 elements
6    |
7    = note: expected type `i32`
8               found type `[{integer}; 3]`
9
10 error[E0308]: mismatched types
11   --> $DIR/array-not-vector.rs:9:20
12    |
13 LL |     let _y: &i32 = x;
14    |                    ^ expected i32, found slice
15    |
16    = note: expected type `&i32`
17               found type `&[i32]`
18
19 error: aborting due to 2 previous errors
20
21 For more information about this error, try `rustc --explain E0308`.