mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 04:57:19 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			13 lines
		
	
	
		
			298 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
		
			298 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| //@ run-rustfix
 | |
| #![allow(unused_variables)]
 | |
| fn main() {
 | |
|     struct U;
 | |
| 
 | |
|     // A tuple is a "non-reference pattern".
 | |
|     // A `mut` binding pattern resets the binding mode to by-value.
 | |
| 
 | |
|     let mut p = (U, U);
 | |
|     let (a, ref mut b) = &mut p;
 | |
|     //~^ ERROR cannot move out of a mutable reference
 | |
| }
 | 
