mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 04:57:19 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			11 lines
		
	
	
		
			340 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			11 lines
		
	
	
		
			340 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| fn main() {
 | |
|     let Some(1) = loop {
 | |
|         //~^ NOTE `else` is attached to this loop
 | |
|         break Some(1)
 | |
|     } else {
 | |
|         //~^ ERROR `loop...else` loops are not supported
 | |
|         //~| NOTE consider moving this `else` clause to a separate `if` statement and use a `bool` variable to control if it should run
 | |
|         return;
 | |
|     };
 | |
| }
 | 
