spec: allow range-over-func to omit iteration variables

For #65236.

Change-Id: I5a11811cc52467ea4446db29c3f86b119f9b2409
Reviewed-on: https://go-review.googlesource.com/c/go/+/592295
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
TryBot-Bypass: Robert Griesemer <gri@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
This commit is contained in:
Robert Griesemer 2024-06-12 14:28:30 -07:00 committed by Gopher Robot
parent e15cc7ab82
commit 8219848c94

View file

@ -1,6 +1,6 @@
<!--{
"Title": "The Go Programming Language Specification",
"Subtitle": "Language version go1.23 (June 4, 2024)",
"Subtitle": "Language version go1.23 (June 12, 2024)",
"Path": "/ref/spec"
}-->
@ -6733,8 +6733,6 @@ to generate iteration values this way for each <code>yield</code> call until
<code>f</code> returns.
If the loop body terminates (such as by a <code>break</code> statement),
<code>yield</code> returns false and must not be called again.
The number of iteration variables must match the number and order of arguments
to <code>yield</code>.
</li>
</ol>