diff options
author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2023-01-19 11:19:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-19 11:19:34 +0100 |
commit | 30ddeefcf09023b5924844bd3a2ac7573c60faf8 (patch) | |
tree | a5d1bc8838c77308c70e0d98a9e0a26fe4c60c1b /tests/rustdoc-js-std/parser-errors.js | |
parent | 65d2f2a5f9c323c88d1068e8e90d0b47a20d491c (diff) | |
parent | 96931a787abaac7d720fc415780037fc63bee98d (diff) | |
download | rust-30ddeefcf09023b5924844bd3a2ac7573c60faf8.tar.gz |
Rollup merge of #105977 - Swatinem:async-mir-context, r=oli-obk
Transform async `ResumeTy` in generator transform
- Eliminates all the `get_context` calls that async lowering created.
- Replace all `Local` `ResumeTy` types with `&mut Context<'_>`.
The `Local`s that have their types replaced are:
- The `resume` argument itself.
- The argument to `get_context`.
- The yielded value of a `yield`.
The `ResumeTy` hides a `&mut Context<'_>` behind an unsafe raw pointer, and the `get_context` function is being used to convert that back to a `&mut Context<'_>`.
Ideally the async lowering would not use the `ResumeTy`/`get_context` indirection, but rather directly use `&mut Context<'_>`, however that would currently lead to higher-kinded lifetime errors.
See <https://github.com/rust-lang/rust/issues/105501>.
The async lowering step and the type / lifetime inference / checking are still using the `ResumeTy` indirection for the time being, and that indirection is removed here. After this transform, the generator body only knows about `&mut Context<'_>`.
---
Fixes https://github.com/bjorn3/rustc_codegen_cranelift/issues/1330 CC `@bjorn3`
r? `@compiler-errors`
Diffstat (limited to 'tests/rustdoc-js-std/parser-errors.js')
0 files changed, 0 insertions, 0 deletions