bors 5b60388e5a Auto merge of #10930 - y21:issue9956, r=blyxyas,xFrednet
[`redundant_closure_call`]: handle nested closures

Fixes #9956.

This ended up being a much larger change than I'd thought, and I ended up having to pretty much rewrite it as a late lint pass, because it needs access to certain things that I don't think are available in early lint passes (e.g. getting the parent expr). I think this'll be required to fi-x #10922 anyway, so this is probably fine.
(edit: had to write "fi-x" because "fix" makes github think that this PR fixes it, which it doesn't 😅 )

Previously, it would suggest changing `(|| || 42)()()` to `|| 42()`, which is a type error (it needs parens: `(|| 42)()`). In my opinion, though, the suggested fix should have really been `42`, so that's what this PR changes.

changelog: [`redundant_closure_call`]: handle nested closures and rewrite as a late lint pass
2023-06-19 20:30:35 +00:00
..
2023-06-12 16:21:06 +01:00
2023-06-10 06:51:03 -05:00
2023-06-16 16:37:19 +09:00
2023-06-10 06:51:03 -05:00
2023-06-17 17:03:31 -03:00
2023-05-24 11:06:56 -05:00
2023-05-24 11:06:56 -05:00
2023-06-10 06:51:03 -05:00
2023-06-10 06:51:03 -05:00
2023-06-10 06:51:03 -05:00
2023-06-06 14:58:54 -04:00
2023-06-10 06:51:03 -05:00
2023-06-10 06:51:03 -05:00
2023-06-10 06:51:03 -05:00
2023-06-10 06:51:03 -05:00
2023-06-10 06:51:03 -05:00
2023-06-15 07:04:47 -05:00
2023-06-10 06:51:03 -05:00
2023-06-10 06:51:03 -05:00
2023-06-09 15:32:42 -05:00
2023-06-09 15:32:42 -05:00
2023-06-10 06:51:03 -05:00
2023-06-10 06:51:03 -05:00
2023-06-10 06:51:03 -05:00
2023-05-31 17:30:23 -05:00
2023-05-31 17:30:23 -05:00
2023-06-10 06:51:03 -05:00
2023-06-10 06:51:03 -05:00
2023-06-10 06:51:03 -05:00
2023-06-12 16:21:06 +01:00
2023-06-12 16:21:06 +01:00
2023-06-12 16:04:34 +02:00
2023-06-12 16:04:34 +02:00
2023-06-12 16:04:34 +02:00
2023-06-12 16:21:06 +01:00
2023-06-12 16:21:06 +01:00
2023-06-12 16:21:06 +01:00
2023-06-12 16:21:06 +01:00
2023-06-12 16:21:06 +01:00
2023-06-09 21:39:58 -04:00
2023-06-10 06:51:03 -05:00
2023-06-10 06:51:03 -05:00
2023-06-06 22:56:57 +02:00
2023-06-10 06:51:03 -05:00
2023-06-10 06:51:03 -05:00
2023-06-06 22:56:57 +02:00
2023-04-27 17:18:12 +00:00
2023-06-10 06:51:03 -05:00
2023-06-10 06:51:03 -05:00
2023-06-10 06:51:03 -05:00
2023-06-10 06:51:03 -05:00
2023-06-09 21:39:58 -04:00
2023-06-09 21:39:58 -04:00
2023-06-06 22:56:57 +02:00
2023-06-15 20:23:11 +02:00
2023-06-15 20:23:11 +02:00
2023-05-21 15:07:53 +02:00
2023-06-10 06:51:03 -05:00
2023-06-10 06:51:03 -05:00
2023-06-10 06:51:03 -05:00
2023-06-10 06:51:03 -05:00
2023-06-12 16:21:06 +01:00
2023-06-12 16:21:06 +01:00
2023-06-10 06:51:03 -05:00
2023-06-06 22:56:57 +02:00
2023-06-12 16:21:06 +01:00
2023-06-12 16:21:06 +01:00
2023-06-12 16:21:06 +01:00
2023-06-10 06:51:03 -05:00
2023-06-12 16:21:06 +01:00
2023-05-23 00:35:00 -05:00
2023-06-10 06:51:03 -05:00
2023-06-12 16:21:06 +01:00
2023-06-12 16:21:06 +01:00
2023-06-12 16:21:06 +01:00
2023-06-12 16:21:06 +01:00
2023-06-12 16:21:06 +01:00
2023-06-12 16:21:06 +01:00
2023-06-12 16:21:06 +01:00
2023-06-10 06:51:03 -05:00
2023-06-10 06:51:03 -05:00
2023-06-02 13:26:12 -05:00
2023-06-02 13:26:12 -05:00
2023-06-06 22:56:57 +02:00
2023-06-12 16:21:06 +01:00
2023-06-12 16:21:06 +01:00
2023-06-12 16:21:06 +01:00
2023-06-10 06:51:03 -05:00
2023-05-22 23:00:28 -04:00
2023-05-22 23:00:28 -04:00
2023-05-22 20:02:45 -04:00
2023-06-10 06:51:03 -05:00
2023-06-10 06:51:03 -05:00
2023-06-10 06:51:03 -05:00
2023-06-14 08:41:20 -05:00
2023-06-10 06:51:03 -05:00
2023-06-10 06:51:03 -05:00
2023-06-06 22:56:57 +02:00
2023-06-06 22:56:57 +02:00
2023-06-06 22:56:57 +02:00
2023-06-10 06:51:03 -05:00
2023-06-10 06:51:03 -05:00
2023-06-10 06:51:03 -05:00
2023-06-10 06:51:03 -05:00
2023-06-12 16:21:06 +01:00
2023-06-12 16:21:06 +01:00
2023-06-12 16:21:06 +01:00
2023-06-12 16:21:06 +01:00
2023-06-12 16:21:06 +01:00
2023-06-10 06:51:03 -05:00
2023-06-10 06:51:03 -05:00
2023-06-10 06:51:03 -05:00
2023-06-12 16:04:34 +02:00
2023-06-12 16:04:34 +02:00
2023-06-12 16:04:34 +02:00