diff options
| author | Cherry Mui <cherryyz@google.com> | 2025-06-30 17:34:01 -0400 |
|---|---|---|
| committer | Cherry Mui <cherryyz@google.com> | 2025-07-29 12:44:58 -0700 |
| commit | 25816d401c459a9dfedded3b42315a8bd2d32802 (patch) | |
| tree | 16b7322d8c0628c0f7a67c67fba5ada7842f1218 /src/runtime | |
| parent | 7961bf71f8d3119ac7a886b3658966973798f426 (diff) | |
| download | go-25816d401c459a9dfedded3b42315a8bd2d32802.tar.xz | |
internal/goexperiment: delete RangeFunc goexperiment
It is now always enabeld. The GOEXPERIMENT doesn't control
anything. Remove.
Change-Id: I50eb09f4537f90ec28152eb59a5a689127843fce
Reviewed-on: https://go-review.googlesource.com/c/go/+/684838
Reviewed-by: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/runtime')
| -rw-r--r-- | src/runtime/crash_test.go | 15 | ||||
| -rw-r--r-- | src/runtime/race/testdata/rangefunc_test.go | 2 | ||||
| -rw-r--r-- | src/runtime/testdata/testprog/coro.go | 2 | ||||
| -rw-r--r-- | src/runtime/testdata/testprogcgo/coro.go | 2 |
4 files changed, 1 insertions, 20 deletions
diff --git a/src/runtime/crash_test.go b/src/runtime/crash_test.go index 8696672065..2db86e0562 100644 --- a/src/runtime/crash_test.go +++ b/src/runtime/crash_test.go @@ -186,21 +186,6 @@ func buildTestProg(t *testing.T, binary string, flags ...string) (string, error) t.Logf("running %v", cmd) cmd.Dir = "testdata/" + binary cmd = testenv.CleanCmdEnv(cmd) - - // Add the rangefunc GOEXPERIMENT unconditionally since some tests depend on it. - // TODO(61405): Remove this once it's enabled by default. - edited := false - for i := range cmd.Env { - e := cmd.Env[i] - if _, vars, ok := strings.Cut(e, "GOEXPERIMENT="); ok { - cmd.Env[i] = "GOEXPERIMENT=" + vars + ",rangefunc" - edited = true - } - } - if !edited { - cmd.Env = append(cmd.Env, "GOEXPERIMENT=rangefunc") - } - out, err := cmd.CombinedOutput() if err != nil { target.err = fmt.Errorf("building %s %v: %v\n%s", binary, flags, err, out) diff --git a/src/runtime/race/testdata/rangefunc_test.go b/src/runtime/race/testdata/rangefunc_test.go index 453c0733ed..986395bfb9 100644 --- a/src/runtime/race/testdata/rangefunc_test.go +++ b/src/runtime/race/testdata/rangefunc_test.go @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build goexperiment.rangefunc - package race_test import ( diff --git a/src/runtime/testdata/testprog/coro.go b/src/runtime/testdata/testprog/coro.go index 032215b801..5f3d302987 100644 --- a/src/runtime/testdata/testprog/coro.go +++ b/src/runtime/testdata/testprog/coro.go @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build goexperiment.rangefunc - package main import ( diff --git a/src/runtime/testdata/testprogcgo/coro.go b/src/runtime/testdata/testprogcgo/coro.go index e0cb945112..93be92cb7a 100644 --- a/src/runtime/testdata/testprogcgo/coro.go +++ b/src/runtime/testdata/testprogcgo/coro.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build goexperiment.rangefunc && !windows +//go:build !windows package main |
