summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/crashes/ice-2594.rs
blob: 3f3986b6fc69294feb25ed0aed8076648b48d500 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#![allow(dead_code, unused_variables)]

/// Should not trigger an ICE in `SpanlessHash` / `consts::constant`
///
/// Issue: https://github.com/rust-lang/rust-clippy/issues/2594

fn spanless_hash_ice() {
    let txt = "something";
    let empty_header: [u8; 1] = [1; 1];

    match txt {
        "something" => {
            let mut headers = [empty_header; 1];
        },
        "" => (),
        _ => (),
    }
}

fn main() {}