mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 13:04:42 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			18 lines
		
	
	
		
			218 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			218 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| //@ run-pass
 | |
| 
 | |
| #![no_std]
 | |
| 
 | |
| extern crate std;
 | |
| 
 | |
| mod foo {
 | |
|     pub fn test() -> Option<i32> {
 | |
|         Some(2)
 | |
|     }
 | |
| }
 | |
| 
 | |
| fn main() {
 | |
|     let a = core::option::Option::Some("foo");
 | |
|     a.unwrap();
 | |
|     foo::test().unwrap();
 | |
| }
 | 
