mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 21:16:44 +00:00 
			
		
		
		
	 87c2f9a5be
			
		
	
	
		87c2f9a5be
		
	
	
	
	
		
			
			This reverts commit 1d35638dc38dbfbf1cc2a9823135dfcf3c650169, reversing changes made to f23a80a4c2fbca593b64e70f5970368824b4c5e9.
		
			
				
	
	
		
			24 lines
		
	
	
		
			414 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			414 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| #![feature(coverage_attribute)]
 | |
| #![coverage(off)]
 | |
| //@ edition: 2021
 | |
| 
 | |
| //@ aux-build: executor.rs
 | |
| extern crate executor;
 | |
| 
 | |
| async fn ready() -> u8 {
 | |
|     1
 | |
| }
 | |
| 
 | |
| #[coverage(on)]
 | |
| #[rustfmt::skip]
 | |
| async fn await_ready() -> u8 {
 | |
|     // await should be covered even if the function never yields
 | |
|     ready()
 | |
|         .await
 | |
| }
 | |
| 
 | |
| fn main() {
 | |
|     let mut future = Box::pin(await_ready());
 | |
|     executor::block_on(future.as_mut());
 | |
| }
 |