]> Cypherpunks.ru repositories - gostls13.git/commitdiff
doc/go1.21: document GOEXPERIMENT=loopvar and invite feedback
authorRuss Cox <rsc@golang.org>
Mon, 5 Jun 2023 17:52:19 +0000 (13:52 -0400)
committerRuss Cox <rsc@golang.org>
Mon, 5 Jun 2023 19:18:13 +0000 (19:18 +0000)
For #60078.

Change-Id: I92ab1fc2f30e6bbaabd8e3e1b8834e6ddff2414d
Reviewed-on: https://go-review.googlesource.com/c/go/+/500958
TryBot-Bypass: Russ Cox <rsc@golang.org>
Reviewed-by: David Chase <drchase@google.com>
doc/go1.21.html

index c6af33ac6ddc47993c490fa3ac493951c0a61854..f7ffc19117152fe6d6b5b0c331406d00efa138a9 100644 (file)
@@ -145,10 +145,11 @@ Do not send CLs removing the interior tags from such phrases.
 
 <!-- https://go.dev/issue/57969 -->
 <p>
-  <!-- TODO(rsc): add GOEXPERIMENT=loopvar -->
+  Go 1.21 includes a preview of a language change we are considering for a future version of Go:
+  making for loop variables per-iteration instead of per-loop, to avoid accidental sharing bugs.
+  For details about how to try that language change, see <a href="https://go.dev/wiki/LoopvarExperiment">the LoopvarExperiment wiki page</a>.
 </p>
 
-
 <p>
   TODO: complete this section
 </p>