Closed
Description
Something is still wrong w/ async call shims. I think I'm not doing the FnOnce
transform correctly or something.
Putting this up so I don't forget about it, but I'll fix it.
#![feature(async_closure)]
#[inline(never)]
async fn call_once(x: impl async FnOnce()) {
x().await
}
#[tokio::main]
async fn main() {
let v = &1;
call_once(async || {
println!("{v}");
}).await;
}
Unexpected initial operand type: expected *mut Coroutine(DefId(0:8 ~ playground[5acf]::main::{closure#0}::{closure#0}::{closure#0}), [i32, std::future::ResumeTy, (), (), CoroutineWitness(DefId(0:8 ~ playground[5acf]::main::{closure#0}::{closure#0}::{closure#0}), []), (&'{erased} i32,)]), found *mut Coroutine(DefId(0:8 ~ playground[5acf]::main::{closure#0}::{closure#0}::{closure#0}), [i32, std::future::ResumeTy, (), (), CoroutineWitness(DefId(0:8 ~ playground[5acf]::main::{closure#0}::{closure#0}::{closure#0}), []), (&'{erased} &'{erased} i32,)]).