]> git.lizzy.rs Git - rust.git/blob - tests/ui/crashes/ice-2594.rs
add test for #5238
[rust.git] / tests / ui / crashes / ice-2594.rs
1 // run-pass
2
3 #![allow(dead_code, unused_variables)]
4
5 /// Should not trigger an ICE in `SpanlessHash` / `consts::constant`
6 ///
7 /// Issue: https://github.com/rust-lang/rust-clippy/issues/2594
8
9 fn spanless_hash_ice() {
10     let txt = "something";
11     let empty_header: [u8; 1] = [1; 1];
12
13     match txt {
14         "something" => {
15             let mut headers = [empty_header; 1];
16         },
17         "" => (),
18         _ => (),
19     }
20 }
21
22 fn main() {}