diff options
| author | bors <bors@rust-lang.org> | 2020-05-31 18:01:40 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-05-31 18:01:40 +0000 |
| commit | 9fdcb13edb4026d1058c793a553f1798c044870c (patch) | |
| tree | 63b47bf0efd2943bba7bf6d0f4e31386015b7db3 /src/libstd/sys/unix/process/process_unix.rs | |
| parent | fcc3ed2cdc442b4d3b8f1cb2be5ef7686ff89b3c (diff) | |
| parent | 77dd0ea62aa6a2af70da4c5e05de064eee182a6c (diff) | |
| download | rust-9fdcb13edb4026d1058c793a553f1798c044870c.tar.gz rust-9fdcb13edb4026d1058c793a553f1798c044870c.zip | |
Auto merge of #4455 - flip1995:unit_arg_appl, r=phansch
Rework suggestion generation of `unit_arg` lint Found this bug while running `cargo fix --clippy` on quite a big codebase: This would replace something like: ```rust Some(fn_that_actually_does_something(&a, b)) ``` with ```rust Some(()) ``` which obviously suppresses side effects. Since pretty much every expression could have side effects, I think making this suggestion `MaybeIncorrect` is the best thing to do here. A correct suggestion would be: ```rust fn_that_actually_does_something(&a, b); Some(()) ``` Somehow the suggestion is not correctly applied to the arguments, when more than one argument is a unit value. I have to look into this a little more, though. changelog: Fixes suggestion of `unit_arg` lint, so that it suggests semantic equivalent code Fixes #4741
Diffstat (limited to 'src/libstd/sys/unix/process/process_unix.rs')
0 files changed, 0 insertions, 0 deletions
