Improve messages when implicit casts from array to slice fails due to const mismatch #21967
Labels
error message
This issue points out an error message that is unhelpful and should be improved.
Zig Version
0.13.0
Steps to Reproduce and Observed Output
Minimal reproduction:
Produces this error message:
Expected Output
This message does not inform the programmer about the true nature of the problem: That
arr
is a const pointer and cannot be converted into a non-const slice.A possible message could be:
Where
target-var-name
is the LHS of an assignment or a function parameter name.The text was updated successfully, but these errors were encountered: