From: David Chase
Date: Wed, 29 Nov 2023 21:09:26 +0000 (-0500)
Subject: doc: describe for loop changes (lifetime, range int; range func experiment)
X-Git-Tag: go1.22rc1~54
X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=fe1b2f95e6dbfb6e6212bb391706ae62eb0ae5ec;p=gostls13.git
doc: describe for loop changes (lifetime, range int; range func experiment)
See also https://go.dev/wiki/RangefuncExperiment, written as a companion
to this change.
For #61422.
Change-Id: I129bf38dd2fa4aef47454138b4ca5ed18653aecf
Reviewed-on: https://go-review.googlesource.com/c/go/+/546095
Reviewed-by: Cherry Mui
Run-TryBot: David Chase
TryBot-Result: Gopher Robot
Reviewed-by: Alan Donovan
---
diff --git a/doc/go1.22.html b/doc/go1.22.html
index c87d9d3b21..7e2b4da20c 100644
--- a/doc/go1.22.html
+++ b/doc/go1.22.html
@@ -26,7 +26,39 @@ Do not send CLs removing the interior tags from such phrases.
Changes to the language
- TODO: complete this section
+
+Go 1.22 makes two changes to "for" loops.
+
+
+
+
+
+ Go 1.22 includes a preview of a language change we are considering
+ for a future version of Go: range-over-function iterators.
+ Building with GOEXPERIMENT=rangefunc
enables this feature.