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