Commit Graph

17 Commits

Author SHA1 Message Date
Andrew Zhogin
d6a9081612 Async drop - fix for StorageLive/StorageDead codegen for pinned async drop future 2025-06-14 15:10:08 +07:00
Matthias Krüger
9ec41bcf72
Rollup merge of #141932 - azhogin:azhogin/async-drop-inside-asyncgen-fix, r=oli-obk
Fix for async drop inside async gen fn

Return value (for yield) is corrected for async drop inside async gen function.
In CFG, when internal async drop future is polled and returned `Poll<()>::Pending`, then async gen resume function returns `Poll<(OptRet)>::Pending`.

Fixes rust-lang/rust#140530
2025-06-04 19:50:21 +02:00
Andrew Zhogin
d5a9a00518 Fix for async drop inside async gen fn 2025-06-04 18:45:34 +07:00
Andrew Zhogin
f023a69f32 Async drop - type instead of async drop fn and incorrect drop signature don't ICE now 2025-06-01 15:22:29 +07:00
Matthias Krüger
f7a11798e8
Rollup merge of #140967 - azhogin:azhogin/async-drop-poll-shim-for-error-dropee-fix, r=oli-obk
Async drop poll shim for error dropee generates noop body

Fixes https://github.com/rust-lang/rust/issues/140930.

When dropee type for async drop poll shim is `ty::Error(_)`, the generated poll function will be noop body. To avoid ICE in `elaborate_drop`.
2025-05-23 13:34:17 +02:00
Andrew Zhogin
cb8fdb4d80 Async drop poll shim for error dropee generates noop body (fixes #140930) 2025-05-23 03:40:27 +07:00
Matthias Krüger
1461ca3f39
Rollup merge of #141328 - azhogin:azhogin/async-drop-ice-for-empty-impl-fix, r=oli-obk
When AsyncDrop impl is empty, sync drop generated in elaborator

Fixes #140974.
2025-05-21 15:38:10 +02:00
Matthias Krüger
ad6fb066dd
Rollup merge of #141296 - azhogin:azhogin/async-drop-broken-mir-place-deref-fix, r=oli-obk
Async drop fix for 'broken mir, place has deref as later projection'

fixes #140975

Problem in codegen fixed with an additional temporary local.
2025-05-21 15:38:10 +02:00
Andrew Zhogin
7c38b6fd28 Async drop fix for 'broken mir in AsyncDropGlue, place has deref as a later projection' (#140975) 2025-05-21 18:29:13 +07:00
Andrew Zhogin
dc794f18a4 When AsyncDrop impl is empty, sync drop generated in elaborator (Fixes #140974) 2025-05-21 18:18:27 +07:00
Andrew Zhogin
4a99cbbf6b Warning when dependency crate has async drop types, and the feature is disabled - typo fixed 2025-05-20 04:36:33 +07:00
Andrew Zhogin
61059282eb Warning added when dependency crate has async drop types, and the feature is disabled 2025-05-19 21:38:07 +07:00
Andrew Zhogin
7b2dcf2989 Async drop fix for dropee from another crate (#140858) 2025-05-15 20:05:07 +07:00
Jorge Aparicio
2fdf3d9820 ui/async-drop-initial: factor in panic strategy in destructor size check
the size of `AsyncStruct`'s destructor depends on whether the configured
panic strategy is 'unwind' or 'abort' so factor that into the test using
conditional compilation

fixes rust-lang/rust#140939
2025-05-12 13:58:20 +02:00
Andrew Zhogin
13178c75ce Async drop fix for async_drop_in_place<T> layout calculated for unspecified T 2025-05-11 03:48:50 +07:00
Andrew Zhogin
cce706ec3c Fix for async drop ice with partly dropped tuple 2025-04-29 21:41:15 +07:00
Andrew Zhogin
c366756a85 AsyncDrop implementation using shim codegen of async_drop_in_place::{closure}, scoped async drop added. 2025-04-28 16:23:13 +07:00