]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/issue-79152-const-array-index.rs
Do not suggest `let_else` if no bindings would be introduced
[rust.git] / src / test / 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() {}