mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-29 20:15:27 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			13 lines
		
	
	
		
			224 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
		
			224 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| // compile-flags: -Zverbose
 | |
| 
 | |
| #![feature(coroutines, coroutine_trait)]
 | |
| 
 | |
| fn main() {
 | |
|     let x = "Type mismatch test";
 | |
|     let coroutine :() = || {
 | |
|     //~^ ERROR mismatched types
 | |
|         yield 1i32;
 | |
|         return x
 | |
|     };
 | |
| }
 | 
