]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/issue-74906.rs
Auto merge of #77379 - camelid:improve-wording-crate-resolution-error, r=davidtwco
[rust.git] / src / test / ui / const-generics / issue-74906.rs
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() { }