rust/compiler/rustc_passes
Tomasz Miąsko 9f6f8620e1 Improve liveness analysis for generators
Liveness analysis for generators assumes that execution always continues
normally after a yield point, not accounting for the fact that generator
could be dropped before completion.

If generators captures any variables by reference, those variables could
be used within a generator, or when the generator completes, but also
after each yield point in the case the generator is dropped.

Account for the case when generator is dropped after yielding, but
before running to the completion. This effectively considers all
variables captured by reference to be used after a yield point.
2021-08-24 13:31:11 +02:00
..
src Improve liveness analysis for generators 2021-08-24 13:31:11 +02:00
Cargo.toml Remove Session.used_attrs and move logic to CheckAttrVisitor 2021-08-21 13:27:27 -05:00