about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-03-26 21:44:05 +0100
committerGitHub <noreply@github.com>2020-03-26 21:44:05 +0100
commitc640b95662acf89a0e716cb0b849c29bff55000f (patch)
tree37fc5e62149c5f1d44217dcb851c164327e6c4c4 /src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs
parentde3d1e9fa9743db0e99ea41b9c0b127b19d1bbbb (diff)
parentae7fa3042da8d432c6048b89d320c73e43615b97 (diff)
downloadrust-c640b95662acf89a0e716cb0b849c29bff55000f.tar.gz
rust-c640b95662acf89a0e716cb0b849c29bff55000f.zip
Rollup merge of #70413 - AminArria:match-pattern-incorrect-warning, r=Centril,Nadrieril,varkor
Fix incorrect pattern warning "unreachable pattern"

Fixes #70372

Added `is_under_guard` parameter to `_match::is_useful` and only add it to the matrix if `false`

Tested with:
```rust
#![feature(or_patterns)]
fn main() {
    match (3,42) {
        (a,_) | (_,a) if a > 10 => {println!("{}", a)}
        _ => ()
    }

    match Some((3,42)) {
        Some((a, _)) | Some((_, a)) if a > 10 => {println!("{}", a)}
        _ => ()

    }

    match Some((3,42)) {
        Some((a, _) | (_, a)) if a > 10 => {println!("{}", a)}
        _ => ()
    }
}
```
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs')
0 files changed, 0 insertions, 0 deletions