rust/compiler/rustc_feature/src
许杰友 Jieyou Xu (Joe) 8eb2e5f4c8
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) } {
    ...
  }
}
```
2024-06-19 01:51:38 +01:00
..
accepted.rs replace version placeholder 2024-06-11 16:52:02 +02:00
builtin_attrs.rs Remove extraneous attribute 2024-06-06 20:36:23 -05:00
lib.rs Use tidy to sort crate attributes for all compiler crates. 2024-06-12 15:49:10 +10:00
removed.rs Gate implicit mutable by-reference bindings behind mut ref 2024-05-15 16:55:54 -04:00
tests.rs tidy: Re-enable check for inline unit tests 2020-12-12 19:18:44 +03:00
unstable.rs Rollup merge of #125293 - dingxiangfei2009:tail-expr-temp-lifetime, r=estebank,davidtwco 2024-06-19 01:51:38 +01:00