2014-08-30 01:32:14 -05:00
|
|
|
fn main() {
|
2015-03-03 02:42:26 -06:00
|
|
|
let _x: i32 = [1, 2, 3];
|
2015-01-12 00:01:44 -06:00
|
|
|
//~^ ERROR mismatched types
|
2023-01-02 20:00:33 -06:00
|
|
|
//~| expected `i32`, found `[{integer}; 3]`
|
2014-08-30 01:32:14 -05:00
|
|
|
|
2015-03-03 02:42:26 -06:00
|
|
|
let x: &[i32] = &[1, 2, 3];
|
2015-01-31 10:23:42 -06:00
|
|
|
let _y: &i32 = x;
|
2015-01-12 00:01:44 -06:00
|
|
|
//~^ ERROR mismatched types
|
2019-11-13 16:16:56 -06:00
|
|
|
//~| expected reference `&i32`
|
|
|
|
//~| found reference `&[i32]`
|
2023-01-02 20:00:33 -06:00
|
|
|
//~| expected `&i32`, found `&[i32]`
|
2014-08-30 01:32:14 -05:00
|
|
|
}
|