rust/compiler/rustc_hir_analysis
bors a5efa01895 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.
2024-09-13 03:47:30 +00:00
..
src Auto merge of #107251 - dingxiangfei2009:let-chain-rescope, r=jieyouxu 2024-09-13 03:47:30 +00:00
Cargo.toml bump itertools to 0.12 2024-03-08 12:34:05 +03:00
README.md rustc_typeck to rustc_hir_analysis 2022-09-27 10:37:23 +02:00
messages.ftl Delegation: support generics for delegation from free functions 2024-07-29 20:04:55 +03:00

README.md

For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc dev guide.