about summary refs log tree commit diff
path: root/tests/mir-opt/lower_array_len.array_len_raw.NormalizeArrayLen.diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-12-31 09:25:18 +0000
committerbors <bors@rust-lang.org>2018-12-31 09:25:18 +0000
commit6f3912850ad92784434a79e0e5062f517d642201 (patch)
tree253e50426b8a7b96e5a2866c39fef60487434281 /tests/mir-opt/lower_array_len.array_len_raw.NormalizeArrayLen.diff
parent529f698c23099cbdb0afe5fe308814639808233d (diff)
parent911a7525619b1c8b283c1019f3b497264c7e0a5d (diff)
downloadrust-6f3912850ad92784434a79e0e5062f517d642201.tar.gz
rust-6f3912850ad92784434a79e0e5062f517d642201.zip
Auto merge of #3590 - jorpic:i3559-if_same_then_else, r=phansch
Fix if_same_then_else false positive

This fixes false positive in #3559.
The problem was that `SpanlessEq` does not check patterns in declarations. So this two blocks considered equal.
```rust
if true {
    let (x, y) = foo();
} else {
   let (y, x) = foo();
}
```
Not sure if the proposed change is safe as `SpanlessEq` is used extensively in other lints, but I tried hard to come up with counterexample and failed.
Diffstat (limited to 'tests/mir-opt/lower_array_len.array_len_raw.NormalizeArrayLen.diff')
0 files changed, 0 insertions, 0 deletions