]> git.lizzy.rs Git - rust.git/blob - tests/ui/const-generics/issues/issue-74906.rs
Rollup merge of #106797 - FawazTirmizi:dev/issues/104284, r=bjorn3
[rust.git] / tests / ui / const-generics / issues / issue-74906.rs
1 // edition:2018
2 // check-pass
3
4
5 const SIZE: usize = 16;
6
7 struct Bar<const H: usize> {}
8
9 struct Foo<const H: usize> {}
10
11 impl<const H: usize> Foo<H> {
12     async fn biz(_: &[[u8; SIZE]]) -> Vec<()> {
13         vec![]
14     }
15
16     pub async fn baz(&self) -> Bar<H> {
17         Self::biz(&vec![]).await;
18         Bar {}
19     }
20 }
21
22 fn main() { }