mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 04:57:19 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			12 lines
		
	
	
		
			244 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
		
			244 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| #![feature(generic_const_exprs)]
 | |
| //~^ WARN the feature `generic_const_exprs` is incomplete
 | |
| 
 | |
| fn foo<T>() {
 | |
|     let _ = [0u8; const { std::mem::size_of::<T>() }];
 | |
|     //~^ ERROR: overly complex generic constant
 | |
| }
 | |
| 
 | |
| fn main() {
 | |
|     foo::<i32>();
 | |
| }
 | 
