935b45db61
Downgrade let_unit_value to pedantic Given that the false positive in #1502 is marked E-hard and I don't have much hope of it getting fixed, I think it would be wise to disable this lint by default. I have had to suppress this lint in every substantial codebase (\>100k line) I have worked in. Any time this lint is being triggered, it's always the false positive case. The motivation for this lint is documented as: > A unit value cannot usefully be used anywhere. So binding one is kind of pointless. with this example: > ```rust > let x = { > 1; > }; > ``` Sure, but the author would find this out via an unused_variable warning or from `x` not being the type that they need further down. If there ends up being a type error on `x`, clippy's advice isn't going to help get the code compiling because it can only run if the code already compiles. changelog: Remove let_unit_value from default set of enabled lints |
||
---|---|---|
.. | ||
auxiliary | ||
cargo | ||
ui | ||
ui-toml | ||
compile-test.rs | ||
dogfood.rs | ||
fmt.rs | ||
integration.rs | ||
missing-test-files.rs | ||
versioncheck.rs |