]> git.lizzy.rs Git - rust.git/blob - tests/ui/async-await/interior-with-const-generic-expr.rs
Rollup merge of #106971 - oli-obk:tait_error, r=davidtwco
[rust.git] / tests / 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 }