mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-30 20:44:34 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			10 lines
		
	
	
		
			280 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			10 lines
		
	
	
		
			280 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| // Test that we enforce repeat expr element types are `Copy` even
 | |
| // when the repeat count is only inferred at a later point in type
 | |
| // checking.
 | |
| 
 | |
| fn main() {
 | |
|     let a = [String::new(); _];
 | |
|     //~^ ERROR: the trait bound `String: Copy` is not satisfied
 | |
|     let b: [_; 2] = a;
 | |
| }
 | 
