]> git.lizzy.rs Git - rust.git/blob - tests/ui/mir/mir_ascription_coercion.rs
Rollup merge of #106441 - mllken:abstract-socket-noref, r=joshtriplett
[rust.git] / tests / ui / mir / mir_ascription_coercion.rs
1 // run-pass
2 // Tests that the result of type ascription has adjustments applied
3
4 #![feature(type_ascription)]
5
6 fn main() {
7     let x = [1, 2, 3];
8     // The RHS should coerce to &[i32]
9     let _y : &[i32] = type_ascribe!(&x, &[i32; 3]);
10 }