From ff2c96805270fec42d3dfa4860160faeec09dc21 Mon Sep 17 00:00:00 2001 From: Alex Yusiuk <55661041+RRRadicalEdward@users.noreply.github.com> Date: Fri, 22 Aug 2025 13:28:26 +0300 Subject: [PATCH] chore: add `mixed_read_write_in_expression` clippy correctness lint (#929) `mixed_read_write_in_expression` checks for a read and a write to the same variable, where whether the read occurs before or after the write depends on the evaluation order of sub-expressions. --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index aa5b6213..cf39a5bd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -103,6 +103,7 @@ as_underscore = "warn" # TODO: unwrap_used = "warn" # Let’s either handle `None`, `Err` or use `expect` to give a reason. large_stack_frames = "warn" mem_forget = "warn" +mixed_read_write_in_expression = "warn" # == Style, readability == # semicolon_outside_block = "warn" # With semicolon-outside-block-ignore-multiline = true