//@ check-pass // issue: rust-lang/rust#88421 #![feature(adt_const_params)] #![feature(generic_const_exprs)] #![allow(incomplete_features)] use std::ops::Index; pub struct CellPossibilities; pub enum CellState { Empty(Option), } pub struct Sudoku; impl Sudokuwhere [CellState; SQUARE_SIZE * SQUARE_SIZE]: Sized, { pub fn random() { let CellState::Empty(_) = Self[()]; } } impl Index<()> for Sudoku where [CellState; SQUARE_SIZE * SQUARE_SIZE]: Sized, { type Output = CellState; fn index(&self, _: ()) -> &Self::Output { todo!() } } pub fn main() {}