mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
![]() Implement `needs_async_drop` in rustc and optimize async drop glue
This PR expands on #121801 and implements `Ty::needs_async_drop` which works almost exactly the same as `Ty::needs_drop`, which is needed for #123948.
Also made compiler's async drop code to look more like compiler's regular drop code, which enabled me to write an optimization where types which do not use `AsyncDrop` can simply forward async drop glue to `drop_in_place`. This made size of the async block from the [async_drop test](
|
||
---|---|---|
.. | ||
check | ||
coherence | ||
collect | ||
errors | ||
hir_ty_lowering | ||
impl_wf_check | ||
outlives | ||
structured_errors | ||
variance | ||
autoderef.rs | ||
bounds.rs | ||
check_unused.rs | ||
collect.rs | ||
constrained_generic_params.rs | ||
errors.rs | ||
hir_wf_check.rs | ||
impl_wf_check.rs | ||
lib.rs | ||
structured_errors.rs |