let_unit_value disallows let () = ...;
when it is useful to ensure the type does not change
#12017
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Summary
An explicit
let () =
(orlet _: () =
) binding is used to guarantee that the return type of an API hasn't changed. This is useful to ensure that the API of an auto-generated C API doesn't change its return type to something that must be freed for example.Basically if the unit type is explicitly specified, this lint shouldn't fire.
Lint Name
let_unit_value
The text was updated successfully, but these errors were encountered: