[dev.typeparams] runtime/race: make test compatible with types2
[dev.typeparams] runtime/race: make test compatible with types2

types2 correctly distinguishes variable assignment from use even
within function literals. Whatever the outcome of #3059, the test
cases in runtime/race need to be fixed to accomodate that.

Change-Id: Ibe3547f07b681ff41225caabaf050872a48c98d1
Reviewed-on: https://go-review.googlesource.com/c/go/+/325030
Trust: Matthew Dempsky <e56ac2c500064424afac424d4b5e53bd0570a731@google.com>
Run-TryBot: Matthew Dempsky <e56ac2c500064424afac424d4b5e53bd0570a731@google.com>
TryBot-Result: Go Bot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>
Reviewed-by: Robert Griesemer <a6752097faebf1f02d80107d77a9be009089afe3@golang.org>

CAFxX/go,cloudflare/go,nawawi/go,cloudflare/go,cloudflare/go,nawawi/go,golang/go,nawawi/go,cloudflare/go,nawawi/go,nawawi/go,CAFxX/go,cloudflare/go,golang/go,CAFxX/go,CAFxX/go,nawawi/go,CAFxX/go,CAFxX/go,golang/go,cloudflare/go,cloudflare/go,nawawi/go,CAFxX/go,golang/go,CAFxX/go,golang/go,golang/go,golang/go,golang/go,cloudflare/go,nawawi/go