Skip to content

Commit 78506f1

Browse files
committed
Add regression test for issue 288
1 parent a11384e commit 78506f1

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

tests/test.rs

+21
Original file line numberDiff line numberDiff line change
@@ -1705,3 +1705,24 @@ pub mod issue283 {
17051705
}
17061706
}
17071707
}
1708+
1709+
// https://github.com/dtolnay/async-trait/issues/288
1710+
pub mod issue288 {
1711+
use async_trait::async_trait;
1712+
1713+
#[async_trait]
1714+
pub trait Trait {
1715+
async fn f<#[cfg(any())] T: Send>(#[cfg(any())] t: T);
1716+
async fn g<#[cfg(all())] T: Send>(#[cfg(all())] t: T);
1717+
}
1718+
1719+
pub struct Struct;
1720+
1721+
#[async_trait]
1722+
impl Trait for Struct {
1723+
async fn f<#[cfg(any())] T: Send>(#[cfg(any())] t: T) {}
1724+
async fn g<#[cfg(all())] T: Send>(#[cfg(all())] t: T) {
1725+
let _ = t;
1726+
}
1727+
}
1728+
}

0 commit comments

Comments
 (0)