rust/compiler/rustc_middle/src
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
..
dep_graph Add warn(unreachable_pub) to rustc_middle. 2024-08-29 20:13:06 +10:00
hir Remove needless returns detected by clippy in the compiler 2024-09-09 13:32:22 +02:00
hooks Reformat use declarations. 2024-07-29 08:26:52 +10:00
infer Reformat use declarations. 2024-07-29 08:26:52 +10:00
middle Auto merge of #107251 - dingxiangfei2009:let-chain-rescope, r=jieyouxu 2024-09-13 03:47:30 +00:00
mir Auto merge of #107251 - dingxiangfei2009:let-chain-rescope, r=jieyouxu 2024-09-13 03:47:30 +00:00
query Rollup merge of #101339 - the8472:ci-randomize-debug, r=Mark-Simulacrum 2024-09-05 03:47:39 +02:00
thir rename AddressOf -> RawBorrow inside the compiler 2024-08-18 19:46:53 +02:00
traits Detect * operator on !Sized expression 2024-08-08 17:35:40 +00:00
ty Auto merge of #107251 - dingxiangfei2009:let-chain-rescope, r=jieyouxu 2024-09-13 03:47:30 +00:00
util Move MirPass to rustc_mir_transform. 2024-09-03 16:03:46 +10:00
arena.rs coverage: CodeRegion is never stored in an arena 2024-08-28 22:03:48 +10:00
error.rs Use bool in favor of Option<()> for diagnostics 2024-08-21 01:31:11 -04:00
lib.rs update cfgs 2024-09-05 17:24:01 +01:00
lint.rs Rewrite lint_expectations in a single pass. 2024-08-31 14:00:54 +00:00
macros.rs lift_to_tcx -> lift_to_interner 2024-07-17 10:46:10 -04:00
metadata.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
tests.rs Give an item related to issue 27438 a more meaningful name 2024-04-30 22:27:19 +02:00
thir.rs rename AddressOf -> RawBorrow inside the compiler 2024-08-18 19:46:53 +02:00
values.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00