diff options
| author | 许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com> | 2024-06-19 01:51:38 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-19 01:51:38 +0100 |
| commit | 8eb2e5f4c887c4d89e4989ae8c1898d2204c41c3 (patch) | |
| tree | 4f5e94a63cbc302ccba64c0f0d6026e219647849 /compiler/rustc_interface/src/errors.rs | |
| parent | c9a9d5cee7f0c0a8c947044c63a6cb5ea1254590 (diff) | |
| parent | 0f8c3f78825a1b6eb765b97f658b92252b55c5df (diff) | |
| download | rust-8eb2e5f4c887c4d89e4989ae8c1898d2204c41c3.tar.gz rust-8eb2e5f4c887c4d89e4989ae8c1898d2204c41c3.zip | |
Rollup merge of #125293 - dingxiangfei2009:tail-expr-temp-lifetime, r=estebank,davidtwco
Place tail expression behind terminating scope
This PR implements #123739 so that we can do further experiments in nightly.
A little rewrite has been applied to `for await` lowering. It was previously `unsafe { Pin::unchecked_new(into_async_iter(..)) }`. Under the edition 2024 rule, however, `into_async_iter` gets dropped at the end of the `unsafe` block. This presumably the first Edition 2024 migration rule goes by hoisting `into_async_iter(..)` into `match` one level above, so it now looks like the following.
```rust
match into_async_iter($iter_expr) {
ref mut iter => match unsafe { Pin::unchecked_new(iter) } {
...
}
}
```
Diffstat (limited to 'compiler/rustc_interface/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
