]> git.lizzy.rs Git - rust.git/commit
A new lint for shared code in if blocks
authorxFrednet <xFrednet@gmail.com>
Fri, 11 Dec 2020 22:29:53 +0000 (22:29 +0000)
committerxFrednet <xFrednet@gmail.com>
Mon, 5 Apr 2021 11:33:45 +0000 (13:33 +0200)
commitd1df73228a7cdadb4d635c6ed77daeeaebbe10ff
tree38a5b89fa161a1d5bde60366541eaf20da9b7364
parent232e2b79f2e76cc7e1c76e0d35968711960dedee
A new lint for shared code in if blocks

* Added expression check for shared_code_in_if_blocks
* Finishing touches for the shared_code_in_if_blocks lint
* Applying PR suggestions
* Update lints yay
* Moved test into subfolder
17 files changed:
CHANGELOG.md
clippy_lints/src/copies.rs
clippy_lints/src/lib.rs
clippy_lints/src/literal_representation.rs
clippy_lints/src/methods/manual_saturating_arithmetic.rs
clippy_utils/src/hir_utils.rs
tests/ui/checked_unwrap/complex_conditionals.rs
tests/ui/if_same_then_else.rs
tests/ui/if_same_then_else.stderr
tests/ui/if_same_then_else2.rs
tests/ui/if_same_then_else2.stderr
tests/ui/let_if_seq.rs
tests/ui/let_if_seq.stderr
tests/ui/shared_code_in_if_blocks/shared_at_bot.rs [new file with mode: 0644]
tests/ui/shared_code_in_if_blocks/shared_at_top.rs [new file with mode: 0644]
tests/ui/shared_code_in_if_blocks/shared_at_top_and_bot.rs [new file with mode: 0644]
tests/ui/shared_code_in_if_blocks/valid_if_blocks.rs [new file with mode: 0644]