mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 13:04:42 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			21 lines
		
	
	
		
			286 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			286 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| // run-pass
 | |
| // compile-flags: -C opt-level=3 -Zvalidate-mir
 | |
| 
 | |
| 
 | |
| 
 | |
| fn return_result() -> Option<String> {
 | |
|     Some("ok".to_string())
 | |
| }
 | |
| 
 | |
| fn start() -> String {
 | |
|     let Some(content) = return_result() else {
 | |
|         return "none".to_string()
 | |
|     };
 | |
| 
 | |
|     content
 | |
| }
 | |
| 
 | |
| fn main() {
 | |
|     start();
 | |
| }
 | 
