mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
15 lines
284 B
Rust
15 lines
284 B
Rust
//@ run-pass
|
|
#![feature(generic_const_exprs)]
|
|
#![feature(transmute_generic_consts)]
|
|
#![allow(incomplete_features)]
|
|
|
|
fn ident<const W: usize, const H: usize>(v: [[u32; H]; W]) -> [[u32; H]; W] {
|
|
unsafe {
|
|
std::mem::transmute(v)
|
|
}
|
|
}
|
|
|
|
fn main() {
|
|
let _ = ident([[0; 8]; 16]);
|
|
}
|