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