fork/rust

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

borsAuto merge of #69854 - pietroalbini:stable-next, r=Centrilb8cedc00407

1.42.0
652 B22 linesraw
1error[E0308]: mismatched types
2  --> $DIR/array-not-vector.rs:2:19
3   |
4LL |     let _x: i32 = [1, 2, 3];
5   |             ---   ^^^^^^^^^ expected `i32`, found array `[{integer}; 3]`
6   |             |
7   |             expected due to this
8
9error[E0308]: mismatched types
10  --> $DIR/array-not-vector.rs:7:20
11   |
12LL |     let _y: &i32 = x;
13   |             ----   ^ expected `i32`, found slice `[i32]`
14   |             |
15   |             expected due to this
16   |
17   = note: expected reference `&i32`
18              found reference `&[i32]`
19
20error: aborting due to 2 previous errors
21
22For more information about this error, try `rustc --explain E0308`.