mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 04:57:19 +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]);
 | |
| }
 | 
