about summary refs log tree commit diff
path: root/src/test/ui/array-not-vector.rs
blob: 504874f2ce364cd65b7c4263e19c8681d8518fa4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
fn main() {
    let _x: i32 = [1, 2, 3];
    //~^ ERROR mismatched types
    //~| expected i32, found array

    let x: &[i32] = &[1, 2, 3];
    let _y: &i32 = x;
    //~^ ERROR mismatched types
    //~| expected reference `&i32`
    //~| found reference `&[i32]`
    //~| expected i32, found slice
}