2014-08-30 06:32:14 +00:00
|
|
|
fn main() {
|
2015-03-03 08:42:26 +00:00
|
|
|
let _x: i32 = [1, 2, 3];
|
2015-01-12 06:01:44 +00:00
|
|
|
//~^ ERROR mismatched types
|
2019-11-15 17:37:01 +00:00
|
|
|
//~| expected `i32`, found array
|
2014-08-30 06:32:14 +00:00
|
|
|
|
2015-03-03 08:42:26 +00:00
|
|
|
let x: &[i32] = &[1, 2, 3];
|
2015-01-31 16:23:42 +00:00
|
|
|
let _y: &i32 = x;
|
2015-01-12 06:01:44 +00:00
|
|
|
//~^ ERROR mismatched types
|
2019-11-13 22:16:56 +00:00
|
|
|
//~| expected reference `&i32`
|
|
|
|
//~| found reference `&[i32]`
|
2019-11-15 17:37:01 +00:00
|
|
|
//~| expected `i32`, found slice
|
2014-08-30 06:32:14 +00:00
|
|
|
}
|