Skip to content

Commit 46ee6b1

Browse files
committed
Add regression test
1 parent 3d44ad2 commit 46ee6b1

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/ui/crashes/ice-5223.rs

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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() {}

0 commit comments

Comments
 (0)