about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorQuinn Sinclair <me@partiallytyped.dev>2024-03-25 23:29:34 +0100
committerQuinn Sinclair <me@partiallytyped.dev>2024-03-25 23:40:30 +0100
commit9655231eb825500d69738382f791374660311390 (patch)
tree8a8391ab008cfb4012d3c7d0fb306f6ff799c6cf /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parentca6a6474904fc7d3e4519a3b5506294b33a12ea8 (diff)
downloadrust-9655231eb825500d69738382f791374660311390.tar.gz
rust-9655231eb825500d69738382f791374660311390.zip
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
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions