Skip to content

Commit

Permalink
Rollup merge of #77331 - hameerabbasi:issue-74906, r=lcnr
Browse files Browse the repository at this point in the history
Add test for async/await combined with const-generics.

Fixes #74906.
  • Loading branch information
jonas-schievink authored Sep 30, 2020
2 parents c46f578 + 2c38504 commit 4e51783
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/test/ui/const-generics/issue-74906.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// edition:2018
// check-pass
// revisions: full min
#![cfg_attr(full, feature(const_generics))]
#![cfg_attr(full, allow(incomplete_features))]
#![cfg_attr(min, feature(min_const_generics))]

const SIZE: usize = 16;

struct Bar<const H: usize> {}

struct Foo<const H: usize> {}

impl<const H: usize> Foo<H> {
async fn biz(_: &[[u8; SIZE]]) -> Vec<()> {
vec![]
}

pub async fn baz(&self) -> Bar<H> {
Self::biz(&vec![]).await;
Bar {}
}
}

fn main() { }

0 comments on commit 4e51783

Please sign in to comment.