diff --git a/tests/ui/ok/async-in-trait.rs b/tests/ui/ok/async-in-trait.rs index e6f7bbf..7714f89 100644 --- a/tests/ui/ok/async-in-trait.rs +++ b/tests/ui/ok/async-in-trait.rs @@ -1,17 +1,19 @@ -#![feature(async_fn_in_trait)] -#![allow(unused_mut)] +#![cfg_attr(all(feature = "nightly", test), feature(async_fn_in_trait))] -trait MyTrait { - async fn work(&self) -> Result; -} - -struct MyStruct; - -impl MyTrait for MyStruct { - #[logcall::logcall("debug")] - #[logcall::logcall(ok = "debug", err = "error")] - async fn work(&self) -> Result { - Ok(1) +#[cfg(all(feature = "nightly", test))] +mod tests { + trait MyTrait { + async fn work(&self) -> Result; + } + + struct MyStruct; + + impl MyTrait for MyStruct { + #[logcall::logcall("debug")] + #[logcall::logcall(ok = "debug", err = "error")] + async fn work(&self) -> Result { + Ok(1) + } } }