From 8979e7586bf6644c081ef77502a4b44fffba55d3 Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Tue, 3 Mar 2020 21:39:45 +0900 Subject: [PATCH] Add regression test --- tests/ui/crashes/ice-5223.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/ui/crashes/ice-5223.rs diff --git a/tests/ui/crashes/ice-5223.rs b/tests/ui/crashes/ice-5223.rs new file mode 100644 index 000000000000..9b80ef260a45 --- /dev/null +++ b/tests/ui/crashes/ice-5223.rs @@ -0,0 +1,17 @@ +// Regression test for #5233 + +#![feature(const_generics)] +#![allow(incomplete_features)] +#![warn(clippy::indexing_slicing)] + +pub struct KotomineArray { + arr: [T; N], +} + +impl KotomineArray { + pub fn ice(self) { + let _ = &self.arr[..]; + } +} + +fn main() {}