mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 10:45:18 +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]);
|
|
}
|