about summary refs log tree commit diff
path: root/compiler/rustc_interface/src/errors.rs
diff options
context:
space:
mode:
author许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com>2024-06-19 01:51:38 +0100
committerGitHub <noreply@github.com>2024-06-19 01:51:38 +0100
commit8eb2e5f4c887c4d89e4989ae8c1898d2204c41c3 (patch)
tree4f5e94a63cbc302ccba64c0f0d6026e219647849 /compiler/rustc_interface/src/errors.rs
parentc9a9d5cee7f0c0a8c947044c63a6cb5ea1254590 (diff)
parent0f8c3f78825a1b6eb765b97f658b92252b55c5df (diff)
downloadrust-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