However, because t.Parallel blocks the goroutine until the main test function returns, the race goes undetected: as far as the race detector is concerned, the program unambiguously meant to use only the last value of the loop variable.
This unintended synchronization masks real bugs, such as the one reported in #35632.
#16520 requests a vet check that would detect this and similar cases, but perhaps there is something we can do within the implementation of t.Parallel in order to expose these races too.
$ go version
go version devel +2bde3c13 Mon Nov 18 05:26:46 2019 +0000 linux/amd64
Hmm, good point. I don't actually think cmd/vet is the right tool here, since t.Parallel can also mask other kinds of races that would presumably not trigger the same vet warning. Retitled accordingly.