summaryrefslogtreecommitdiff
path: root/tests/rustdoc-js-std/parser-errors.js
diff options
context:
space:
mode:
authorArpad Borsos <swatinem@swatinem.de>2022-12-20 15:15:29 +0100
committerArpad Borsos <swatinem@swatinem.de>2023-01-19 09:03:05 +0100
commit96931a787abaac7d720fc415780037fc63bee98d (patch)
tree66f88274150177d17c4f110d599d4348bce591a7 /tests/rustdoc-js-std/parser-errors.js
parent6ba6d22bdf5348e566dedc77a7dfee3f3804f2fb (diff)
downloadrust-96931a787abaac7d720fc415780037fc63bee98d.tar.gz
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<'_>`.
Diffstat (limited to 'tests/rustdoc-js-std/parser-errors.js')
0 files changed, 0 insertions, 0 deletions