about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-12-03 17:27:08 +0100
committerGitHub <noreply@github.com>2024-12-03 17:27:08 +0100
commit93781324db80800e8790fcff31c656274ce1cb5c (patch)
tree75a64e81a1bef57ed3d7459040f4bd97ac0a9418 /compiler/rustc_codegen_llvm/src
parent1ae6f4756ec9b5a1d20aaca6b6bbbd5a61803912 (diff)
parent2d61c0906a31ff1310603ee13582c05f29aa1190 (diff)
downloadrust-93781324db80800e8790fcff31c656274ce1cb5c.tar.gz
rust-93781324db80800e8790fcff31c656274ce1cb5c.zip
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.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions