mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-28 11:38:01 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			15 lines
		
	
	
		
			287 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			287 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| struct A {
 | |
|     b: usize,
 | |
|     c: usize
 | |
| }
 | |
| 
 | |
| impl A {
 | |
|     fn foo(&self) {
 | |
|         let A { x, y } = self.d; //~ ERROR no field `d` on type `&A`
 | |
|         //~^ ERROR struct `A` does not have fields named `x`, `y`
 | |
|         //~| ERROR pattern does not mention fields `b`, `c`
 | |
|     }
 | |
| }
 | |
| 
 | |
| fn main() {}
 | 
