Skip to content

Commit

Permalink
Add regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed Mar 3, 2020
1 parent 3d44ad2 commit 8979e75
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/ui/crashes/ice-5223.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Regression test for #5233

#![feature(const_generics)]
#![allow(incomplete_features)]
#![warn(clippy::indexing_slicing)]

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

impl<T, const N: usize> KotomineArray<T, N> {
pub fn ice(self) {
let _ = &self.arr[..];
}
}

fn main() {}

0 comments on commit 8979e75

Please sign in to comment.