diff options
Diffstat (limited to '')
-rw-r--r-- | tests/run-coverage/closure_macro_async.rs | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/tests/run-coverage/closure_macro_async.rs b/tests/run-coverage/closure_macro_async.rs index e3e89e9c8..b4275599e 100644 --- a/tests/run-coverage/closure_macro_async.rs +++ b/tests/run-coverage/closure_macro_async.rs @@ -1,5 +1,5 @@ // compile-flags: --edition=2018 -#![feature(no_coverage)] +#![feature(coverage_attribute)] macro_rules! bail { ($msg:literal $(,)?) => { @@ -39,9 +39,9 @@ pub async fn test() -> Result<(), String> { Ok(()) } -#[no_coverage] +#[coverage(off)] fn main() { - executor::block_on(test()); + executor::block_on(test()).unwrap(); } mod executor { @@ -51,22 +51,18 @@ mod executor { task::{Context, Poll, RawWaker, RawWakerVTable, Waker}, }; - #[no_coverage] + #[coverage(off)] pub fn block_on<F: Future>(mut future: F) -> F::Output { let mut future = unsafe { Pin::new_unchecked(&mut future) }; use std::hint::unreachable_unchecked; static VTABLE: RawWakerVTable = RawWakerVTable::new( - - #[no_coverage] + #[coverage(off)] |_| unsafe { unreachable_unchecked() }, // clone - - #[no_coverage] + #[coverage(off)] |_| unsafe { unreachable_unchecked() }, // wake - - #[no_coverage] + #[coverage(off)] |_| unsafe { unreachable_unchecked() }, // wake_by_ref - - #[no_coverage] + #[coverage(off)] |_| (), ); let waker = unsafe { Waker::from_raw(RawWaker::new(core::ptr::null(), &VTABLE)) }; |