Quinn Sinclair
eee4db928f
Replace elided variable in let_unit
with ()
when used
...
Situation: `let_unit` lints when an expression binds a unit (`()`)
to a variable. In some cases this binding may be passed down to
another function. Currently, the lint removes the binding without
considering usage.
Change: All usages of the elided variable are now replaced with `()`.
fixes : #12594
2024-04-01 13:40:36 +02:00
Centri3
fd9d330839
Don't lint let_unit_value
when ()
is explicit
2024-01-05 16:04:02 +00:00
mojave2
7426c83d8f
add a test case
2023-09-16 00:05:57 +08:00
Oli Scherer
3d88fae050
Update ui test crate
2023-08-11 14:02:28 +00:00
Oli Scherer
def1705a27
Update to a compiletest-rs version that requires //@
for commands
2023-04-20 14:44:03 +00:00
Takayuki Nakata
027f19c8b9
Fix FP for let_unit_value
when await
used
2023-03-03 22:41:39 +09:00
Jason Newcomb
2872b7e0a4
Allow let () = ..
as type inference for let_unit_value
2022-07-07 20:06:37 -04:00
Jason Newcomb
196174ddad
Changes to let_unit_value
...
* View through locals in `let_unit_value` when determining if inference is required
* Don't remove typed let bindings for more functions
2022-07-07 20:06:36 -04:00
Alex Macleod
a5b70a4c1d
Fix allow attributes in let_unit_value
2022-07-01 12:14:28 +00:00
Jason Newcomb
70f7c624e4
Allow more complex expressions in let_unit_value
2022-04-14 21:34:33 -04:00
Jason Newcomb
d68ac9ccce
Don't lint let_unit_value
when needed for type inferenece
2022-04-14 21:32:51 -04:00
flip1995
385f4474da
Add tests for auto fixable let_unit suggestion
2019-08-05 09:31:08 +02:00