Tools to expand async function?

In my understanding, Rust compiler transforms an async function into a finite state machine. I wonder if there is a tool which can expand this transformation and output the generated finite state machine Rust code?

I think you need to generate HIR/MIR to see the transformations. Here's a blog/wiki with some of the details.

1 Like