about summary refs log tree commit diff
path: root/tests/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-07-20 14:46:23 +0000
committerbors <bors@rust-lang.org>2023-07-20 14:46:23 +0000
commit7c5095c5023ec2ae1629d00baa3d249caf70a8c3 (patch)
tree5b91583640e6b1e67756471470e8fe470e34c324 /tests/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs
parentfca1f9aec544e9b7d6a23827a30d0835a103a124 (diff)
parentf743fec6b0fdeb3c980e350043116bd30e364126 (diff)
downloadrust-7c5095c5023ec2ae1629d00baa3d249caf70a8c3.tar.gz
rust-7c5095c5023ec2ae1629d00baa3d249caf70a8c3.zip
Auto merge of #11195 - thvdveld:fix-option-env-ifs-equal-cond, r=Manishearth
fix: false positive for `option_env!` in `ifs_same_cond`

Clippy had a false positive for with `ifs_same_cond` when two if-let expressions have an `option_env!` macro. The fix is similar to the `env!` macro fix.

The following example had a clippy error:

```rust
if let Some(env1) = option_env!("ENV1") {
    // ...
} else if let Some(env2) = option_env!("ENV2") {
    // ...
}
```

See https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=01b85c61b56ddd900117fb247af04824

changelog: [`ifs_same_cond`]: fix false positive when using `option_env!` in if-let expressions.
Diffstat (limited to 'tests/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs')
0 files changed, 0 insertions, 0 deletions