mirror of
				https://git.proxmox.com/git/rustc
				synced 2025-11-04 07:17:58 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			12 lines
		
	
	
		
			313 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
		
			313 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
// This test illustrates a case where full NLL (enabled by the feature
 | 
						|
// switch below) produces superior diagnostics to the NLL-migrate
 | 
						|
// mode.
 | 
						|
 | 
						|
fn doit(data: &'static mut ()) {
 | 
						|
    || doit(data);
 | 
						|
    //~^ ERROR lifetime may not live long enough
 | 
						|
    //~| ERROR `data` does not live long enough
 | 
						|
}
 | 
						|
 | 
						|
fn main() { }
 |