mirror of
				https://git.proxmox.com/git/rustc
				synced 2025-11-04 07:17:58 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			15 lines
		
	
	
		
			213 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			213 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
// Check that coroutines respect the muatability of their upvars.
 | 
						|
 | 
						|
#![feature(coroutines)]
 | 
						|
 | 
						|
fn mutate_upvar() {
 | 
						|
    let x = 0;
 | 
						|
    move || {
 | 
						|
        x = 1;
 | 
						|
        //~^ ERROR
 | 
						|
        yield;
 | 
						|
    };
 | 
						|
}
 | 
						|
 | 
						|
fn main() {}
 |