2018-08-30 14:18:55 +02:00
|
|
|
// run-pass
|
2016-05-01 17:56:07 +12:00
|
|
|
// Tests that the result of type ascription has adjustments applied
|
|
|
|
|
|
2016-08-24 06:36:37 +03:00
|
|
|
#![feature(type_ascription)]
|
2016-05-01 17:56:07 +12:00
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
|
let x = [1, 2, 3];
|
|
|
|
|
// The RHS should coerce to &[i32]
|
2022-11-19 22:11:00 +01:00
|
|
|
let _y : &[i32] = type_ascribe!(&x, &[i32; 3]);
|
2016-05-01 17:56:07 +12:00
|
|
|
}
|