rust/compiler/rustc_lint
Matthias Krüger 93781324db
Rollup merge of #133753 - dingxiangfei2009:reduce-false-positive-if-let-rescope, r=jieyouxu
Reduce false positives on some common cases from if-let-rescope lint

r? `@jieyouxu`

We would like to identify a very common case in the ecosystem in which we do not need to apply the lint suggestion for the new Edition 2024 `if let` semantics.

In this patch we excluded linting from `if let`s in statements and block tail expressions. In these simple cases, new Edition 2024 drop orders are identical to those of Edition 2021 and prior.

However, conservatively we should still lint for the other cases, because [this example](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=2113df5ce78f161d32a1190faf5c7469) shows that the drop order changes are very pronounced, some of which are even sensitive to runtime data.
2024-12-03 17:27:08 +01:00
..
src Rollup merge of #133753 - dingxiangfei2009:reduce-false-positive-if-let-rescope, r=jieyouxu 2024-12-03 17:27:08 +01:00
Cargo.toml Remove unused intercrate dependencies 2024-11-07 14:17:16 +00:00
messages.ftl Rollup merge of #133545 - clubby789:symbol-intern-lit, r=jieyouxu 2024-12-03 17:27:06 +01:00