Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Lok <andylokandy@hotmail.com>
  • Loading branch information
andylokandy committed Jul 22, 2023
1 parent af6d937 commit fa4a13a
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions tests/ui/ok/async-in-trait.rs
Original file line number Diff line number Diff line change
@@ -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<usize, usize>;
}

struct MyStruct;

impl MyTrait for MyStruct {
#[logcall::logcall("debug")]
#[logcall::logcall(ok = "debug", err = "error")]
async fn work(&self) -> Result<usize, usize> {
Ok(1)
#[cfg(all(feature = "nightly", test))]
mod tests {
trait MyTrait {
async fn work(&self) -> Result<usize, usize>;
}

struct MyStruct;

impl MyTrait for MyStruct {
#[logcall::logcall("debug")]
#[logcall::logcall(ok = "debug", err = "error")]
async fn work(&self) -> Result<usize, usize> {
Ok(1)
}
}
}

Expand Down

0 comments on commit fa4a13a

Please sign in to comment.