2025-04-05 19:19:56 +03:00
|
|
|
//@ dont-require-annotations: NOTE
|
|
|
|
|
|
2014-08-30 18:32:14 +12:00
|
|
|
fn main() {
|
2015-03-03 10:42:26 +02:00
|
|
|
let _x: i32 = [1, 2, 3];
|
2015-01-12 01:01:44 -05:00
|
|
|
//~^ ERROR mismatched types
|
2025-04-05 19:19:56 +03:00
|
|
|
//~| NOTE expected `i32`, found `[{integer}; 3]`
|
2014-08-30 18:32:14 +12:00
|
|
|
|
2015-03-03 10:42:26 +02:00
|
|
|
let x: &[i32] = &[1, 2, 3];
|
2015-01-31 17:23:42 +01:00
|
|
|
let _y: &i32 = x;
|
2015-01-12 01:01:44 -05:00
|
|
|
//~^ ERROR mismatched types
|
2025-04-05 19:19:56 +03:00
|
|
|
//~| NOTE expected reference `&i32`
|
|
|
|
|
//~| NOTE found reference `&[i32]`
|
|
|
|
|
//~| NOTE expected `&i32`, found `&[i32]`
|
2014-08-30 18:32:14 +12:00
|
|
|
}
|