mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-11-04 06:56:14 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			13 lines
		
	
	
		
			286 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
		
			286 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
//@ edition: 2021
 | 
						|
 | 
						|
#![feature(unsized_fn_params)]
 | 
						|
 | 
						|
use std::future::Future;
 | 
						|
 | 
						|
async fn bug<T>(mut f: dyn Future<Output = T> + Unpin) -> T {
 | 
						|
    //~^ ERROR the size for values of type `dyn Future<Output = T> + Unpin` cannot be known at compilation time
 | 
						|
    (&mut f).await
 | 
						|
}
 | 
						|
 | 
						|
fn main() {}
 |