diff options
| author | bors <bors@rust-lang.org> | 2024-03-31 12:16:01 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-03-31 12:16:01 +0000 |
| commit | 797d50dfe6f4bbfdd30510e9d8b326da17f1213c (patch) | |
| tree | 015d1416aa5cd03036d96a18ba2758b55730e4ba /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | 3787a0ccb8e69a59ce7474cdff6ee3e39902f568 (diff) | |
| parent | 60937bf2dbf68e36c078087b3a0dc01d6857465a (diff) | |
| download | rust-797d50dfe6f4bbfdd30510e9d8b326da17f1213c.tar.gz rust-797d50dfe6f4bbfdd30510e9d8b326da17f1213c.zip | |
Auto merge of #12562 - m-rph:12501, r=y21
Allow `filter_map_identity` when the closure is typed This extends the `filter_map_identity` lint to support typed closures. For untyped closures, we know that the program compiles, and therefore we can safely suggest using flatten. For typed closures, they may participate in type resolution. In this case we use `Applicability::MaybeIncorrect`. Details: https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/Should.20.60filter_map_identity.60.20lint.20when.20closures.20are.20typed.3F changelog: `filter_map_identity` will now suggest using flatten for typed closures. r? `@y21` && `@Centri3`
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
