rust/compiler/rustc_mir_transform
Arpad Borsos 9f36f988ad
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.
2022-11-24 10:04:27 +01:00
..
src Avoid GenFuture shim when compiling async constructs 2022-11-24 10:04:27 +01:00
Cargo.toml interpret: use Either over Result when it is not representing an error condition 2022-11-18 10:18:32 +01:00