rust/compiler/rustc_traits/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
..
chalk Avoid GenFuture shim when compiling async constructs 2022-11-24 10:04:27 +01:00
dropck_outlives.rs make dropck_outlives into a proper canonicalized type query 2022-11-09 22:58:39 +00:00
evaluate_obligation.rs Convert predicates into Predicate in the Obligation constructor 2022-11-16 09:25:19 +00:00
implied_outlives_bounds.rs Pass ObligationCtxt from enter_canonical_trait_query and use ObligationCtxt API 2022-11-23 09:36:03 -03:00
lib.rs (almost) Always use ObligationCtxt when dealing with canonical queries 2022-10-27 15:43:33 +00:00
normalize_erasing_regions.rs Add an always-ambiguous predicate to make sure that we don't accidentlally allow trait resolution to prove false things during coherence 2022-11-21 16:35:04 +00:00
normalize_projection_ty.rs (almost) Always use ObligationCtxt when dealing with canonical queries 2022-10-27 15:43:33 +00:00
type_op.rs Convert predicates into Predicate in the Obligation constructor 2022-11-16 09:25:19 +00:00