mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 04:57:19 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			21 lines
		
	
	
		
			342 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			342 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| // issue #41834
 | |
| 
 | |
| #[derive(Default)]
 | |
| struct Foo {
 | |
|     one: u8,
 | |
| }
 | |
| 
 | |
| fn main() {
 | |
|     let foo = Foo {
 | |
|         one: 111,
 | |
|         ..Foo::default(),
 | |
|         //~^ ERROR cannot use a comma after the base struct
 | |
|     };
 | |
| 
 | |
|     let foo = Foo {
 | |
|         ..Foo::default(),
 | |
|         //~^ ERROR cannot use a comma after the base struct
 | |
|         one: 111,
 | |
|     };
 | |
| }
 | 
