about summary refs log tree commit diff
path: root/tests/ui/patchable-function-entry/patchable-function-entry-flags.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-03-31 12:16:01 +0000
committerbors <bors@rust-lang.org>2024-03-31 12:16:01 +0000
commit797d50dfe6f4bbfdd30510e9d8b326da17f1213c (patch)
tree015d1416aa5cd03036d96a18ba2758b55730e4ba /tests/ui/patchable-function-entry/patchable-function-entry-flags.rs
parent3787a0ccb8e69a59ce7474cdff6ee3e39902f568 (diff)
parent60937bf2dbf68e36c078087b3a0dc01d6857465a (diff)
downloadrust-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 'tests/ui/patchable-function-entry/patchable-function-entry-flags.rs')
0 files changed, 0 insertions, 0 deletions