Skip to content

Commit 2c38504

Browse files
committed
Add test for async/await combined with const-generics.
1 parent 26373fb commit 2c38504

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// edition:2018
2+
// check-pass
3+
// revisions: full min
4+
#![cfg_attr(full, feature(const_generics))]
5+
#![cfg_attr(full, allow(incomplete_features))]
6+
#![cfg_attr(min, feature(min_const_generics))]
7+
8+
const SIZE: usize = 16;
9+
10+
struct Bar<const H: usize> {}
11+
12+
struct Foo<const H: usize> {}
13+
14+
impl<const H: usize> Foo<H> {
15+
async fn biz(_: &[[u8; SIZE]]) -> Vec<()> {
16+
vec![]
17+
}
18+
19+
pub async fn baz(&self) -> Bar<H> {
20+
Self::biz(&vec![]).await;
21+
Bar {}
22+
}
23+
}
24+
25+
fn main() { }

0 commit comments

Comments
 (0)