This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit 0c77356
authored
Unrolled build for rust-lang#140630
Rollup merge of rust-lang#140630 - azhogin:azhogin/async-drop-proxy-source-info-fix, r=oli-obk
Async drop source info fix for proxy-drop-coroutine
Fixes crash at debug info generation: rust-lang#140426 .
Also, the submitted example requires sync Drop implementation too.
Because sync version is required for unwind and when drop is performed in sync context (sync function).
Probably, it is also needed to add such a lint/error about missed `impl Drop`, when there is `impl AsyncDrop`.
Fix description: even minimal, empty coroutine (for proxy-coroutine) has 3 states and the source info array should have 3 elements too.
```
#![feature(async_drop)]
use std::future::AsyncDrop;
use std::pin::Pin;
#[tokio::main(flavor = "current_thread")]
async fn main() {
let _st = St;
}
struct St;
impl AsyncDrop for St {
async fn drop(self: Pin<&mut Self>) {
println!("123");
}
}
```1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1929 | 1929 | | |
1930 | 1930 | | |
1931 | 1931 | | |
| 1932 | + | |
| 1933 | + | |
1932 | 1934 | | |
1933 | 1935 | | |
| 1936 | + | |
| 1937 | + | |
1934 | 1938 | | |
1935 | 1939 | | |
1936 | 1940 | | |
1937 | 1941 | | |
1938 | | - | |
| 1942 | + | |
1939 | 1943 | | |
1940 | 1944 | | |
1941 | 1945 | | |
| |||
0 commit comments