From b2d445868fb4f7dc30616d060b5caac8506feb59 Mon Sep 17 00:00:00 2001 From: jw013 Date: Sat, 27 Jul 2024 12:36:06 -0400 Subject: [PATCH] Enable tests for async fn in traits (#839) Co-authored-by: jw013 <890943+jw013@users.noreply.github.com> --- .../async_impl_future_equivalence/new/src/lib.rs | 13 +++++-------- .../async_impl_future_equivalence/old/src/lib.rs | 13 +++++-------- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/test_crates/async_impl_future_equivalence/new/src/lib.rs b/test_crates/async_impl_future_equivalence/new/src/lib.rs index 3f2d8003..c4c01a04 100644 --- a/test_crates/async_impl_future_equivalence/new/src/lib.rs +++ b/test_crates/async_impl_future_equivalence/new/src/lib.rs @@ -19,11 +19,8 @@ impl S { pub async fn switches_to_async() {} } -// TODO: https://github.com/obi1kenobi/cargo-semver-checks/issues/624 -// Uncomment once the project drops support for Rust < 1.75 -// -// #[allow(async_fn_in_trait)] -// pub trait Trait { -// fn switches_to_return_impl() -> impl Future; -// async fn switches_to_async(); -// } +#[allow(async_fn_in_trait)] +pub trait Trait { + fn switches_to_return_impl() -> impl Future; + async fn switches_to_async(); +} diff --git a/test_crates/async_impl_future_equivalence/old/src/lib.rs b/test_crates/async_impl_future_equivalence/old/src/lib.rs index 04d5c3f3..0cb9e2f1 100644 --- a/test_crates/async_impl_future_equivalence/old/src/lib.rs +++ b/test_crates/async_impl_future_equivalence/old/src/lib.rs @@ -19,11 +19,8 @@ impl S { } } -// TODO: https://github.com/obi1kenobi/cargo-semver-checks/issues/624 -// Uncomment once the project drops support for Rust < 1.75 -// -// #[allow(async_fn_in_trait)] -// pub trait Trait { -// async fn switches_to_return_impl(); -// fn switches_to_async() -> impl Future; -// } +#[allow(async_fn_in_trait)] +pub trait Trait { + async fn switches_to_return_impl(); + fn switches_to_async() -> impl Future; +}