Mirror of https://github.com/cue-lang/cue cuelang.org
cue go

internal/pkg: rely on the adt package to wrap call errors master

It already does this for builtin validator calls, let it do the same for non-validator calls as well. This is a net reduction in code size, given that the adt package already has a bit of code to stringify a builtin func name. Moreover, a few dozen errors were missing this wrapping entirely, given that they failed in ways that internal/pkg did not cover. As a bonus, we also avoid stuttering in builtin validator calls, and we save about 0.4% of allocated objects in the Inventory module. Signed-off-by: Daniel Martí <mvdan@mvdan.cc> Change-Id: I1a7cc355476833ef70b9a4b11f21c4d639261ae3 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1234621 Reviewed-by: Marcel van Lohuizen <mpvl@gmail.com> TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>