Noalias should be allowed on slice parameters #7742
Labels
enhancement
Solving this issue will likely involve adding new logic or components to the codebase.
proposal
This issue suggests modifications. If it also has the "accepted" label then it is planned.
Milestone
Noalias is currently disallowed on slice parameters. This limitation means that I need to split slices into ptr + len parameters when noalias is important to specify, which is inconvenient. If the inner function doesn't actually need the length, my code becomes less safe because it doesn't have bounds checks anymore in debug mode. #1108 does not solve this, because the opposite problem exists if
mayalias
is disallowed on slice parameters.I don't think there are any significant downsides to allowing this, the intent is clear.
The text was updated successfully, but these errors were encountered: