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