internal/mod/modload: preserve custom struct in module when tidying requirements
This updates modfileFromRequirements to copy the custom struct from the
original modfile to the tidied one.
Fixes #3876
Closes #3877 as merged as of commit 43982180.
Signed-off-by: Stefan Nuxoll <stefan@nuxoll.me>
Change-Id: I3e1b57aeb9570aabc0da992f491a445998b80fcf
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1212931
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
authored by