mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 13:04:42 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			15 lines
		
	
	
		
			252 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			252 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| //@ compile-flags: -Z teach
 | |
| 
 | |
| struct Thing {
 | |
|     x: u32,
 | |
|     y: u32
 | |
| }
 | |
| 
 | |
| fn main() {
 | |
|     let thing = Thing { x: 0, y: 0 };
 | |
|     match thing {
 | |
|         Thing { x, y, z } => {}
 | |
|         //~^ ERROR struct `Thing` does not have a field named `z` [E0026]
 | |
|     }
 | |
| }
 | 
