mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-11-03 22:49:17 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			10 lines
		
	
	
		
			218 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			10 lines
		
	
	
		
			218 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
//@ edition:2018
 | 
						|
 | 
						|
use std::future::Future;
 | 
						|
fn foo<T: Send, U>(ty: T, ty1: U) -> impl Future<Output = (T, U)> + Send {
 | 
						|
    //~^ Error future cannot be sent between threads safely
 | 
						|
    async { (ty, ty1) }
 | 
						|
}
 | 
						|
 | 
						|
fn main() {}
 |