mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 16:54:01 +00:00
11 lines
239 B
Rust
11 lines
239 B
Rust
// 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]);
|
|
}
|