about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/builder.rs
diff options
context:
space:
mode:
authorArpad Borsos <swatinem@swatinem.de>2022-11-18 22:56:22 +0100
committerArpad Borsos <swatinem@swatinem.de>2022-11-24 10:04:27 +0100
commit9f36f988ad873f5d34cd9c08e4903c597ffc9532 (patch)
tree48825cd5da62cbc7f585c6c991a3b8e25d01dd20 /compiler/rustc_codegen_llvm/src/builder.rs
parentfd815a5091eb4d49cd317f8ad272f17b7a5f550d (diff)
downloadrust-9f36f988ad873f5d34cd9c08e4903c597ffc9532.tar.gz
rust-9f36f988ad873f5d34cd9c08e4903c597ffc9532.zip
Avoid `GenFuture` shim when compiling async constructs
Previously, async constructs would be lowered to "normal" generators,
with an additional `from_generator` / `GenFuture` shim in between to
convert from `Generator` to `Future`.

The compiler will now special-case these generators internally so that
async constructs will *directly* implement `Future` without the need
to go through the `from_generator` / `GenFuture` shim.

The primary motivation for this change was hiding this implementation
detail in stack traces and debuginfo, but it can in theory also help
the optimizer as there is less abstractions to see through.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/builder.rs')
0 files changed, 0 insertions, 0 deletions