Files
rust/tests/ui
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
..
2020-03-04 00:56:43 +01:00
2020-03-03 18:06:59 -08:00
2020-03-11 06:35:07 +09:00
2020-04-01 12:15:39 -07:00
2020-04-01 20:14:05 +02:00
2020-03-04 17:37:01 +09:00
2020-03-04 17:37:01 +09:00
2020-03-04 17:37:01 +09:00
2020-03-13 02:06:47 +09:00
2020-03-13 02:06:47 +09:00
2020-03-13 01:25:18 +09:00
2020-03-20 22:52:53 +00:00
2020-03-31 16:13:51 +05:30
2020-03-04 00:56:43 +01:00
2020-03-04 00:56:43 +01:00
2020-04-02 18:31:31 -07:00
2020-04-01 20:12:36 +02:00
2020-04-01 20:12:36 +02:00
2020-03-29 22:22:36 +02:00
2020-03-11 06:35:07 +09:00
2020-03-10 18:00:37 -04:00
2020-03-10 18:00:37 -04:00
2020-03-23 16:45:31 +00:00