]> git.lizzy.rs Git - rust.git/blob - tests/ui/crashes/ice-5223.rs
Add regression test
[rust.git] / tests / ui / crashes / ice-5223.rs
1 // Regression test for #5233
2
3 #![feature(const_generics)]
4 #![allow(incomplete_features)]
5 #![warn(clippy::indexing_slicing, clippy::iter_cloned_collect)]
6
7 pub struct KotomineArray<T, const N: usize> {
8     arr: [T; N],
9 }
10
11 impl<T: std::clone::Clone, const N: usize> KotomineArray<T, N> {
12     pub fn ice(self) {
13         let _ = self.arr[..];
14         let _ = self.arr.iter().cloned().collect::<Vec<_>>();
15     }
16 }
17
18 fn main() {}