mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 04:57:19 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			13 lines
		
	
	
		
			264 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
		
			264 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| // edition: 2021
 | |
| 
 | |
| use std::future::Future;
 | |
| fn foo() -> impl Future<Output=()> {
 | |
|     async { }
 | |
| }
 | |
| 
 | |
| fn main() {
 | |
|     let fut = foo();
 | |
|     fut.poll();
 | |
|     //~^ ERROR no method named `poll` found for opaque type `impl Future<Output = ()>` in the current scope [E0599]
 | |
| }
 | 
