mirror of
https://github.com/rust-lang/rust.git
synced 2025-11-01 13:34:38 +00:00
Currently all generators are named with a `generator$N` suffix, regardless of where they come from. This means an `async fn` shows up as a generator in stack traces, which can be surprising to async programmers since they should not need to know that async functions are implementated using generators. This change generators a different name depending on the generator kind, allowing us to tell whether the generator is the result of an async block, an async closure, an async fn, or a plain generator.
Please read the rustc-dev-guide chapter on Backend Agnostic Codegen.