internal/core/export: fix hidden identifier renaming in for clauses
The exporter's ident method, used to create AST identifiers for
for-clause binding variables, was using Feature.IdentString which
does not apply the package hash suffix for hidden identifiers from
inlined packages. Meanwhile, references to those bindings went
through identString which does apply the suffix, causing a mismatch;
the binding stayed as "_v" while references became "_v_567475F3".
Fix by making ident use identString consistently,
so both bindings and references get the same rewritten name.
Fixes #4254.
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: I71a6b48e075ac1557a9aa221526144b8cbc8c612
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1231149
Reviewed-by: Matthew Sackman <matthew@cue.works>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>