Weird error message when not providing array length
Was trying to trigger a panic message, but detected this:
fn x() -> bool {
let a: [bool; bool] = [true, false];
false
}
error: Expected type [bool; bool], got [bool; 2]
┌─ testinput:2:27
│
2 │ let a: [bool; bool] = [true, false];
│ ^^^^^^^^^^^^^ Expected [bool; bool] here
I guess that [bool; bool]
should really trigger the error (which was the panic I was looking for).