rust/tests
bors 9f27b1562c Auto merge of #11673 - y21:issue11672, r=Manishearth
[`unnecessary_lazy_eval`]: reduce applicability if closure has return type annotation

Fixes #11672

We already check if closure parameters don't have type annotations and reduce the applicability to `MaybeIncorrect` if they do, since those help type inference and removing them breaks code. We didn't do this for return type annotations however. This PR adds it. This doesn't change it to produce a fix that will compile, but it will prevent rustfix from auto-applying it.

(In general I'm not sure if we can suggest a fix that will compile. In this specific example, it might be possible to suggest `&[] as &[u8]`, but as-casts won't always work, e.g. `Default::default() as &[u8]` is a compile error, so just reducing applicability should be a safe fix in any case for now)

changelog: [`unnecessary_lazy_eval`]: reduce applicability to `MaybeIncorrect` if closure has return type annotation
2023-10-16 16:27:01 +00:00
..
test_utils
ui Auto merge of #11673 - y21:issue11672, r=Manishearth 2023-10-16 16:27:01 +00:00
ui-cargo Merge commit '98363cbf6a' into clippyup 2023-09-12 18:44:06 +02:00
ui-internal Merge commit '98363cbf6a' into clippyup 2023-09-12 18:44:06 +02:00
ui-toml Auto merge of #11550 - blyxyas:fix-impl_trait_in_params-for_assocfn, r=dswij 2023-10-08 21:57:56 +00:00
workspace_test Merge commit '37f4c1725d' into clippyup 2023-07-02 14:59:02 +02:00
check-fmt.rs
clippy.toml
compile-test.rs Update ui_test to 0.21.2 2023-10-08 19:35:41 +01:00
dogfood.rs Merge commit '371120bdbf' into clippyup 2023-05-05 17:45:49 +02:00
headers.rs Merge commit '080b587854' into clippyup 2023-08-24 21:32:12 +02:00
integration.rs Merge commit '5436dba826' into clippyup 2023-07-31 23:53:53 +02:00
lint_message_convention.rs Merge commit 'd9c24d1b1e' into clippyup 2023-07-17 10:22:32 +02:00
missing-test-files.rs Merge commit '37f4c1725d' into clippyup 2023-07-02 14:59:02 +02:00
versioncheck.rs
workspace.rs Merge commit '37f4c1725d' into clippyup 2023-07-02 14:59:02 +02:00