]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/interior-with-const-generic-expr.rs
Merge commit 'd3a2366ee877075c59b38bd8ced55f224fc7ef51' into sync_cg_clif-2022-07-26
[rust.git] / src / test / ui / async-await / interior-with-const-generic-expr.rs
1 // edition:2018
2 // run-pass
3
4 #![allow(incomplete_features)]
5 #![feature(generic_const_exprs)]
6 #![allow(unused)]
7
8 fn main() {
9     let x = test();
10 }
11
12 fn concat<const A: usize, const B: usize>(a: [f32; A], b: [f32; B]) -> [f32; A + B] {
13     todo!()
14 }
15
16 async fn reverse<const A: usize>(x: [f32; A]) -> [f32; A] {
17     todo!()
18 }
19
20 async fn test() {
21     let a = [0.0];
22     let b = [1.0, 2.0];
23     let ab = concat(a,b);
24     let ba = reverse(ab).await;
25     println!("{:?}", ba);
26 }