summaryrefslogtreecommitdiffstats
path: root/tests/ui/mir/mir_ascription_coercion.rs
blob: 9e04d60198721d3dcced06f6d352ee37ea94f690 (plain)
1
2
3
4
5
6
7
8
9
10
// run-pass
// Tests that the result of type ascription has adjustments applied

#![feature(type_ascription)]

fn main() {
    let x = [1, 2, 3];
    // The RHS should coerce to &[i32]
    let _y : &[i32] = type_ascribe!(&x, &[i32; 3]);
}