]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/issue-79152-const-array-index.rs
Rollup merge of #107004 - compiler-errors:new-solver-new-candidates-2, r=lcnr
[rust.git] / tests / ui / consts / issue-79152-const-array-index.rs
1 // check-pass
2 // Regression test for issue #79152
3 //
4 // Tests that we can index an array in a const function
5
6 const fn foo() {
7     let mut array = [[0; 1]; 1];
8     array[0][0] = 1;
9 }
10
11 fn main() {}