From 00a7bdcb55dbaffcf73e42c9c11e37823cc6e8cc Mon Sep 17 00:00:00 2001 From: Cherry Mui Date: Wed, 30 Jul 2025 16:16:48 -0400 Subject: all: delete aliastypeparams GOEXPERIMENT Always enable aliastypeparams and remove the GOEXPERIMENT. Change-Id: Ic38fe25b0bba312a7f83f7bb94b57ab75ce0f0c3 Reviewed-on: https://go-review.googlesource.com/c/go/+/691956 LUCI-TryBot-Result: Go LUCI Reviewed-by: Mark Freeman Reviewed-by: Michael Knyszek --- src/internal/buildcfg/exp.go | 7 +++---- src/internal/goexperiment/exp_aliastypeparams_off.go | 8 -------- src/internal/goexperiment/exp_aliastypeparams_on.go | 8 -------- src/internal/goexperiment/flags.go | 5 ----- src/internal/types/testdata/fixedbugs/issue67683.go | 2 +- src/internal/types/testdata/fixedbugs/issue69576.go | 2 +- src/internal/types/testdata/spec/typeAliases1.23b.go | 2 +- 7 files changed, 6 insertions(+), 28 deletions(-) delete mode 100644 src/internal/goexperiment/exp_aliastypeparams_off.go delete mode 100644 src/internal/goexperiment/exp_aliastypeparams_on.go (limited to 'src/internal') diff --git a/src/internal/buildcfg/exp.go b/src/internal/buildcfg/exp.go index df84e9fdf4..310226bc01 100644 --- a/src/internal/buildcfg/exp.go +++ b/src/internal/buildcfg/exp.go @@ -79,10 +79,9 @@ func ParseGOEXPERIMENT(goos, goarch, goexp string) (*ExperimentFlags, error) { dwarf5Supported := (goos != "darwin" && goos != "ios" && goos != "aix") baseline := goexperiment.Flags{ - RegabiWrappers: regabiSupported, - RegabiArgs: regabiSupported, - AliasTypeParams: true, - Dwarf5: dwarf5Supported, + RegabiWrappers: regabiSupported, + RegabiArgs: regabiSupported, + Dwarf5: dwarf5Supported, } // Start with the statically enabled set of experiments. diff --git a/src/internal/goexperiment/exp_aliastypeparams_off.go b/src/internal/goexperiment/exp_aliastypeparams_off.go deleted file mode 100644 index 620d34ec79..0000000000 --- a/src/internal/goexperiment/exp_aliastypeparams_off.go +++ /dev/null @@ -1,8 +0,0 @@ -// Code generated by mkconsts.go. DO NOT EDIT. - -//go:build !goexperiment.aliastypeparams - -package goexperiment - -const AliasTypeParams = false -const AliasTypeParamsInt = 0 diff --git a/src/internal/goexperiment/exp_aliastypeparams_on.go b/src/internal/goexperiment/exp_aliastypeparams_on.go deleted file mode 100644 index 8f6872cdcd..0000000000 --- a/src/internal/goexperiment/exp_aliastypeparams_on.go +++ /dev/null @@ -1,8 +0,0 @@ -// Code generated by mkconsts.go. DO NOT EDIT. - -//go:build goexperiment.aliastypeparams - -package goexperiment - -const AliasTypeParams = true -const AliasTypeParamsInt = 1 diff --git a/src/internal/goexperiment/flags.go b/src/internal/goexperiment/flags.go index dd7a4f446c..3144d3adfc 100644 --- a/src/internal/goexperiment/flags.go +++ b/src/internal/goexperiment/flags.go @@ -100,11 +100,6 @@ type Flags struct { // inlining phase within the Go compiler. NewInliner bool - // AliasTypeParams enables type parameters for alias types. - // Requires that gotypesalias=1 is set with GODEBUG. - // This flag will be removed with Go 1.25. - AliasTypeParams bool - // Synctest enables the testing/synctest package. Synctest bool diff --git a/src/internal/types/testdata/fixedbugs/issue67683.go b/src/internal/types/testdata/fixedbugs/issue67683.go index f7c9bcdd01..c9ad5f6788 100644 --- a/src/internal/types/testdata/fixedbugs/issue67683.go +++ b/src/internal/types/testdata/fixedbugs/issue67683.go @@ -1,4 +1,4 @@ -// -goexperiment=aliastypeparams -gotypesalias=1 +// -gotypesalias=1 // Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/src/internal/types/testdata/fixedbugs/issue69576.go b/src/internal/types/testdata/fixedbugs/issue69576.go index 97e03dfab4..fc436bbfd3 100644 --- a/src/internal/types/testdata/fixedbugs/issue69576.go +++ b/src/internal/types/testdata/fixedbugs/issue69576.go @@ -1,4 +1,4 @@ -// -goexperiment=aliastypeparams -gotypesalias=1 +// -gotypesalias=1 // Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/src/internal/types/testdata/spec/typeAliases1.23b.go b/src/internal/types/testdata/spec/typeAliases1.23b.go index c92c3d3a7e..8a09899066 100644 --- a/src/internal/types/testdata/spec/typeAliases1.23b.go +++ b/src/internal/types/testdata/spec/typeAliases1.23b.go @@ -1,4 +1,4 @@ -// -lang=go1.23 -gotypesalias=1 -goexperiment=aliastypeparams +// -lang=go1.23 -gotypesalias=1 // Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style -- cgit v1.3