-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Normalize generator-local types with unevaluated constants
- Loading branch information
1 parent
cfa4ac6
commit d35b23e
Showing
2 changed files
with
32 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/test/ui/async-await/interior-with-const-generic-expr.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// edition:2018 | ||
// run-pass | ||
|
||
#![allow(incomplete_features)] | ||
#![feature(generic_const_exprs)] | ||
#![allow(unused)] | ||
|
||
fn main() { | ||
let x = test(); | ||
} | ||
|
||
fn concat<const A: usize, const B: usize>(a: [f32; A], b: [f32; B]) -> [f32; A + B] { | ||
todo!() | ||
} | ||
|
||
async fn reverse<const A: usize>(x: [f32; A]) -> [f32; A] { | ||
todo!() | ||
} | ||
|
||
async fn test() { | ||
let a = [0.0]; | ||
let b = [1.0, 2.0]; | ||
let ab = concat(a,b); | ||
let ba = reverse(ab).await; | ||
println!("{:?}", ba); | ||
} |