mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 13:04:42 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			16 lines
		
	
	
		
			305 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			305 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| // Regression test for issue #75904
 | |
| // Tests that we point at an expression
 | |
| // that required the upvar to be moved, rather than just borrowed.
 | |
| 
 | |
| struct NotCopy;
 | |
| 
 | |
| fn main() {
 | |
|     let mut a = NotCopy;
 | |
|     loop {
 | |
|         || { //~ ERROR use of moved value
 | |
|             &mut a;
 | |
|             a;
 | |
|         };
 | |
|     }
 | |
| }
 |