mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-28 11:38:01 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			12 lines
		
	
	
		
			197 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
		
			197 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| // check-pass
 | |
| // Regression test for issue #79152
 | |
| //
 | |
| // Tests that we can index an array in a const function
 | |
| 
 | |
| const fn foo() {
 | |
|     let mut array = [[0; 1]; 1];
 | |
|     array[0][0] = 1;
 | |
| }
 | |
| 
 | |
| fn main() {}
 | 
