rust/clippy_lints
Philipp Krones 935b45db61
Rollup merge of #5409 - dtolnay:letunit, r=flip1995
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
2020-04-08 15:50:16 +02:00
..
src Rollup merge of #5409 - dtolnay:letunit, r=flip1995 2020-04-08 15:50:16 +02:00
Cargo.toml Remove dependency on matches crate 2020-03-25 07:50:08 +01:00
README.md clippy_lints: readme: don't mention crates.io since it is no longer used to publish clippy. 2020-03-10 01:05:54 +01:00

This crate contains Clippy lints. For the main crate, check GitHub.