From 25816d401c459a9dfedded3b42315a8bd2d32802 Mon Sep 17 00:00:00 2001 From: Cherry Mui Date: Mon, 30 Jun 2025 17:34:01 -0400 Subject: 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 LUCI-TryBot-Result: Go LUCI --- src/runtime/crash_test.go | 15 --------------- src/runtime/race/testdata/rangefunc_test.go | 2 -- src/runtime/testdata/testprog/coro.go | 2 -- src/runtime/testdata/testprogcgo/coro.go | 2 +- 4 files changed, 1 insertion(+), 20 deletions(-) (limited to 'src/runtime') 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 -- cgit v1.3