From c23a457e72abe608715ac76f076f47dc42af07a5 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 30 May 2024 20:31:44 +0200 Subject: Merging upstream version 1.74.1+dfsg1. Signed-off-by: Daniel Baumann --- tests/run-coverage/closure_macro_async.rs | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'tests/run-coverage/closure_macro_async.rs') 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(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)) }; -- cgit v1.2.3