Change:
<ins> // 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); } </ins>

Discussion:
Error is with genericconstexprs : <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongBacktrace</strong</summary<p</p</details<!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
I actually hit this same issue with capturing un-normalized types in generator interiors when playing around with . I think I know a fix. claim

<!-- Thank you for finding an Internal Compiler Error! If possible, try to provide a minimal verifiable example. You can read "Rust Bug Minimization Patterns" for how to create smaller examples. --code from glacier <!-- If you're using the stable version of the compiler, you should also check if the bug also exists in the beta or nightly versions. --: <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongBacktrace</strong</summary<p</p</details
label +AsyncAwait-Triaged This looks like a probable const generics bug.
updated code: `

<!-- Thank you for finding an Internal Compiler Error! If possible, try to provide a minimal verifiable example. You can read "Rust Bug Minimization Patterns" for how to create smaller examples. --This error will surface if the arg has been accessed at least once(i did this with ) and if there is an async function that is awaited in the body. If I remove the await for it will run as normal. This error happened while I was using actix-web so I reproduced the simplest version of my code. <!-- If you're using the stable version of the compiler, you should also check if the bug also exists in the beta or nightly versions. --: <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongBacktrace</strong</summary<p</p</details
Maybe related to . label +requires-nightly +AsyncAwait-Triaged
Looks like someone used the wrong variable in one of the two places
I also meet this problem but was unable to reproduce it. The compiler complains about But here is , because = . I tried to play with this issue on my own project by replacing all occurrence of to , it would complain something like In this cause is one of the . It seems like this problem is because the generator is trying to find a type with a concrete name, but there are different corresponding name in MIR.
Minimised to: Interestingly, removing the braces around the 0 allows it to compile fine. Regression bisected to: 2021-03-28 <details<summarybisected with <a href=''cargo-bisect-rustc</av0.6.0</summaryHost triple: x86_64-unknown-linux-gnu Reproduce with: </detailsBest guess is that it's an effect of:
In my case, I found out that it only breaks with .
When it is surrounded by {} it evaluates it, which as shown above is finding two separate symbols that don't match (that's what this issue is for)
Reproduced in 4 different builds on 2 different repos with nightly 2022-01-21. I am not sure if this is the same issue. Although the crash message says clippy, it seems to be a problem from the rustc code. Should I create a new issue?

That looks like a separate issue to me, so please do open a new issue (feel free to point back at this one as something similar).
Seems no longer reproduced on latest nightly, not sure if it is some update in the libraries or the rustc itself.

<!-- Thank you for finding an Internal Compiler Error! If possible, try to provide a minimal verifiable example. You can read "Rust Bug Minimization Patterns" for how to create smaller examples. --<!-- If you're using the stable version of the compiler, you should also check if the bug also exists in the beta or nightly versions. --: <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongBacktrace</strong</summary<p</p</details
could you share your code that caused the issue or a list of steps to reproduce the crash?
I try, but it may take some time.
this issue should no longer happen, could you verify it?