rust/compiler/rustc_const_eval/src
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
..
const_eval Rollup merge of #104564 - RalfJung:either, r=oli-obk 2022-11-20 18:21:48 +01:00
interpret Rollup merge of #104564 - RalfJung:either, r=oli-obk 2022-11-20 18:21:48 +01:00
transform Avoid GenFuture shim when compiling async constructs 2022-11-24 10:04:27 +01:00
util Use tcx.require_lang_item instead of unwrapping 2022-11-22 17:19:19 +00:00
errors.rs Migrate all diagnostics 2022-10-23 10:09:44 +02:00
lib.rs Remove allow(rustc::potential_query_instability) in rustc_const_eval 2022-10-18 17:44:01 +02:00