internal/encoding/yaml: reject trailing input in Unmarshal
To be consistent with encoding/json.Unmarshal, and so that both
pkg/encoding/json and pkg/encoding/yaml's Unmarshal APIs reject it.
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: Iee7dabf35d578d461c7aecd5ff6282774a51d017
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1193242
Reviewed-by: Roger Peppe <rogpeppe@gmail.com>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>