about summary refs log tree commit diff
path: root/compiler/rustc_session/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-09-13 03:47:30 +0000
committerbors <bors@rust-lang.org>2024-09-13 03:47:30 +0000
commita5efa01895e82fa705146507d15311b29c715450 (patch)
tree3dd45f08b8469ab0c17b9b0ec7c579371730edf7 /compiler/rustc_session/src
parentd3a8524e80244d66968ab4522d31145ccba610f4 (diff)
parentb4b2b356d958664f87c5b12344256c536e9e1b14 (diff)
downloadrust-a5efa01895e82fa705146507d15311b29c715450.tar.gz
rust-a5efa01895e82fa705146507d15311b29c715450.zip
Auto merge of #107251 - dingxiangfei2009:let-chain-rescope, r=jieyouxu
Rescope temp lifetime in if-let into IfElse with migration lint

Tracking issue #124085

This PR shortens the temporary lifetime to cover only the pattern matching and consequent branch of a `if let`.

At the expression location, means that the lifetime is shortened from previously the deepest enclosing block or statement in Edition 2021. This warrants an Edition change.

Coming with the Edition change, this patch also implements an edition lint to warn about the change and a safe rewrite suggestion to preserve the 2021 semantics in most cases.

Related to #103108.
Related crater runs: https://github.com/rust-lang/rust/pull/129466.
Diffstat (limited to 'compiler/rustc_session/src')
0 files changed, 0 insertions, 0 deletions