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