summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/crashes/ice-5223.rs
blob: e3b3b27a6fc382c933c387a46ad43c98917e6ae5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Regression test for #5233
#![warn(clippy::indexing_slicing, clippy::iter_cloned_collect)]

pub struct KotomineArray<T, const N: usize> {
    arr: [T; N],
}

impl<T: std::clone::Clone, const N: usize> KotomineArray<T, N> {
    pub fn ice(self) {
        let _ = self.arr[..];
        let _ = self.arr.iter().cloned().collect::<Vec<_>>();
    }
}

fn main() {}