]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/crashes/ice-5223.rs
Rollup merge of #86263 - fee1-dead:rustdoc-layout-variants, r=camelid
[rust.git] / src / tools / clippy / 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() {}