mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-30 20:44:34 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			16 lines
		
	
	
		
			201 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			201 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| // run-pass
 | |
| 
 | |
| #![allow(dead_code)]
 | |
| 
 | |
| #[derive(Debug)]
 | |
| struct Foo {
 | |
|     x: isize,
 | |
|     y: isize
 | |
| }
 | |
| 
 | |
| pub fn main() {
 | |
|     let a = Foo { x: 1, y: 2 };
 | |
|     let c = Foo { x: 4, .. a};
 | |
|     println!("{:?}", c);
 | |
| }
 | 
