cmd/link: do not close over the loop variable in testDWARF

Fixes #30429
Updates #16520
Updates #20733

Change-Id: Iae41f06c09aaaed500936f5496d90cefbe8293e4
Reviewed-on: https://go-review.googlesource.com/c/164119
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Bryan C. Mills 2019-02-27 12:25:59 -05:00
parent c81b830023
commit fa8a3f3080
1 changed files with 1 additions and 0 deletions

View File

@ -44,6 +44,7 @@ func testDWARF(t *testing.T, buildmode string, expectDWARF bool, env ...string)
defer os.RemoveAll(tmpDir)
for _, prog := range []string{"testprog", "testprogcgo"} {
prog := prog
t.Run(prog, func(t *testing.T) {
t.Parallel()