mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-30 20:44:34 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			14 lines
		
	
	
		
			268 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			268 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| enum Foo {
 | |
|     A { a, b: usize }
 | |
|     //~^ ERROR expected `:`, found `,`
 | |
| }
 | |
| 
 | |
| fn main() {
 | |
|     // no complaints about non-existing fields
 | |
|     let f = Foo::A { a:3, b: 4};
 | |
|     match f {
 | |
|         // no complaints about non-existing fields
 | |
|         Foo::A {a, b} => {}
 | |
|     }
 | |
| }
 | 
