aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Donovan <adonovan@google.com>2024-03-27 09:38:59 -0400
committerAlan Donovan <adonovan@google.com>2024-04-03 18:48:38 +0000
commit6ffbcd82497afd00c3b345e45cc3969b5f07c225 (patch)
treecbb0188cb55bb75a05d4b95ab5adaad1626891af
parent170862d68377ac04a35223521ce9e450007a6032 (diff)
downloadgo-6ffbcd82497afd00c3b345e45cc3969b5f07c225.tar.gz
go-6ffbcd82497afd00c3b345e45cc3969b5f07c225.zip
go/types: include link to source in generated files
This makes navigation a little easier. Also, make the "inconsistent generated files" test's error message more explicit about which file is which. Change-Id: Iae1fb9e496fb68325448d807469a5b0c55ceda99 Reviewed-on: https://go-review.googlesource.com/c/go/+/574715 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Robert Findley <rfindley@google.com> Auto-Submit: Alan Donovan <adonovan@google.com>
-rw-r--r--src/go/types/alias.go1
-rw-r--r--src/go/types/api_predicates.go1
-rw-r--r--src/go/types/array.go1
-rw-r--r--src/go/types/assignments.go1
-rw-r--r--src/go/types/basic.go1
-rw-r--r--src/go/types/builtins.go1
-rw-r--r--src/go/types/builtins_test.go1
-rw-r--r--src/go/types/chan.go1
-rw-r--r--src/go/types/const.go1
-rw-r--r--src/go/types/context.go1
-rw-r--r--src/go/types/context_test.go1
-rw-r--r--src/go/types/conversions.go1
-rw-r--r--src/go/types/errors_test.go1
-rw-r--r--src/go/types/errsupport.go1
-rw-r--r--src/go/types/gccgosizes.go1
-rw-r--r--src/go/types/gcsizes.go1
-rw-r--r--src/go/types/generate_test.go13
-rw-r--r--src/go/types/hilbert_test.go1
-rw-r--r--src/go/types/infer.go1
-rw-r--r--src/go/types/initorder.go1
-rw-r--r--src/go/types/instantiate.go1
-rw-r--r--src/go/types/instantiate_test.go1
-rw-r--r--src/go/types/lookup.go1
-rw-r--r--src/go/types/main_test.go1
-rw-r--r--src/go/types/map.go1
-rw-r--r--src/go/types/mono.go1
-rw-r--r--src/go/types/named.go1
-rw-r--r--src/go/types/object.go1
-rw-r--r--src/go/types/object_test.go1
-rw-r--r--src/go/types/objset.go1
-rw-r--r--src/go/types/operand.go1
-rw-r--r--src/go/types/package.go1
-rw-r--r--src/go/types/pointer.go1
-rw-r--r--src/go/types/predicates.go1
-rw-r--r--src/go/types/scope.go1
-rw-r--r--src/go/types/selection.go1
-rw-r--r--src/go/types/sizes.go1
-rw-r--r--src/go/types/slice.go1
-rw-r--r--src/go/types/subst.go1
-rw-r--r--src/go/types/termlist.go1
-rw-r--r--src/go/types/termlist_test.go1
-rw-r--r--src/go/types/tuple.go1
-rw-r--r--src/go/types/typelists.go1
-rw-r--r--src/go/types/typeparam.go1
-rw-r--r--src/go/types/typeset.go1
-rw-r--r--src/go/types/typestring.go1
-rw-r--r--src/go/types/typeterm.go1
-rw-r--r--src/go/types/typeterm_test.go1
-rw-r--r--src/go/types/under.go1
-rw-r--r--src/go/types/unify.go1
-rw-r--r--src/go/types/universe.go1
-rw-r--r--src/go/types/util_test.go1
-rw-r--r--src/go/types/validtype.go1
53 files changed, 61 insertions, 4 deletions
diff --git a/src/go/types/alias.go b/src/go/types/alias.go
index 739dbf7a87..e32ddbcb33 100644
--- a/src/go/types/alias.go
+++ b/src/go/types/alias.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/alias.go
// Copyright 2023 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/api_predicates.go b/src/go/types/api_predicates.go
index d712afe0ff..8462baae45 100644
--- a/src/go/types/api_predicates.go
+++ b/src/go/types/api_predicates.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/api_predicates.go
// Copyright 2023 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/array.go b/src/go/types/array.go
index f19ce6e528..d0a66eae89 100644
--- a/src/go/types/array.go
+++ b/src/go/types/array.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/array.go
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/assignments.go b/src/go/types/assignments.go
index dd28e0618d..01a55d582f 100644
--- a/src/go/types/assignments.go
+++ b/src/go/types/assignments.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/assignments.go
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/basic.go b/src/go/types/basic.go
index d483616413..685f17224c 100644
--- a/src/go/types/basic.go
+++ b/src/go/types/basic.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/basic.go
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/builtins.go b/src/go/types/builtins.go
index 2272335945..43a87498ae 100644
--- a/src/go/types/builtins.go
+++ b/src/go/types/builtins.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/builtins.go
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/builtins_test.go b/src/go/types/builtins_test.go
index e7dd50d4b8..a76a13523a 100644
--- a/src/go/types/builtins_test.go
+++ b/src/go/types/builtins_test.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/builtins_test.go
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/chan.go b/src/go/types/chan.go
index 940620067c..ced6b11cdc 100644
--- a/src/go/types/chan.go
+++ b/src/go/types/chan.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/chan.go
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/const.go b/src/go/types/const.go
index 4956d12883..c1ed14abe2 100644
--- a/src/go/types/const.go
+++ b/src/go/types/const.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/const.go
// Copyright 2023 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/context.go b/src/go/types/context.go
index ce9bbf305e..5fe336a82f 100644
--- a/src/go/types/context.go
+++ b/src/go/types/context.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/context.go
// Copyright 2021 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/context_test.go b/src/go/types/context_test.go
index c9f6dce728..cd0a15e8fe 100644
--- a/src/go/types/context_test.go
+++ b/src/go/types/context_test.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/context_test.go
// Copyright 2021 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/conversions.go b/src/go/types/conversions.go
index 1658567114..98a1f9f661 100644
--- a/src/go/types/conversions.go
+++ b/src/go/types/conversions.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/conversions.go
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/errors_test.go b/src/go/types/errors_test.go
index b605a580e8..a11e713f97 100644
--- a/src/go/types/errors_test.go
+++ b/src/go/types/errors_test.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/errors_test.go
// Copyright 2020 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/errsupport.go b/src/go/types/errsupport.go
index 9519375bfe..68d55aa1ac 100644
--- a/src/go/types/errsupport.go
+++ b/src/go/types/errsupport.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/errsupport.go
// Copyright 2024 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/gccgosizes.go b/src/go/types/gccgosizes.go
index 9152c811e1..6aa9e1e586 100644
--- a/src/go/types/gccgosizes.go
+++ b/src/go/types/gccgosizes.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/gccgosizes.go
// Copyright 2019 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/gcsizes.go b/src/go/types/gcsizes.go
index 99ab95fb90..227c53e1d2 100644
--- a/src/go/types/gcsizes.go
+++ b/src/go/types/gcsizes.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/gcsizes.go
// Copyright 2023 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/generate_test.go b/src/go/types/generate_test.go
index 22ace576fe..2b0e4a4289 100644
--- a/src/go/types/generate_test.go
+++ b/src/go/types/generate_test.go
@@ -10,6 +10,7 @@ package types_test
import (
"bytes"
"flag"
+ "fmt"
"go/ast"
"go/format"
"go/parser"
@@ -51,7 +52,7 @@ func TestGenerate(t *testing.T) {
}
func generate(t *testing.T, filename string, write bool) {
- // parse src
+ // parse src (cmd/compile/internal/types2)
srcFilename := filepath.FromSlash(runtime.GOROOT() + srcDir + filename)
file, err := parser.ParseFile(fset, srcFilename, nil, parser.ParseComments)
if err != nil {
@@ -68,26 +69,30 @@ func generate(t *testing.T, filename string, write bool) {
// format AST
var buf bytes.Buffer
- buf.WriteString("// Code generated by \"go test -run=Generate -write=all\"; DO NOT EDIT.\n\n")
+ rel, _ := filepath.Rel(dstDir, srcDir)
+ fmt.Fprintf(&buf, "// Code generated by \"go test -run=Generate -write=all\"; DO NOT EDIT.\n")
+ fmt.Fprintf(&buf, "// Source: %s/%s\n\n", filepath.ToSlash(rel), filename)
if err := format.Node(&buf, fset, file); err != nil {
t.Fatal(err)
}
generatedContent := buf.Bytes()
+ // read dst (go/types)
dstFilename := filepath.FromSlash(runtime.GOROOT() + dstDir + filename)
onDiskContent, err := os.ReadFile(dstFilename)
if err != nil {
t.Fatalf("reading %q: %v", filename, err)
}
- if d := diff.Diff(filename+" (on disk)", onDiskContent, filename+" (generated)", generatedContent); d != nil {
+ // compare on-disk dst with buffer generated from src.
+ if d := diff.Diff(filename+" (on disk in "+dstDir+")", onDiskContent, filename+" (generated from "+srcDir+")", generatedContent); d != nil {
if write {
t.Logf("applying change:\n%s", d)
if err := os.WriteFile(dstFilename, generatedContent, 0o644); err != nil {
t.Fatalf("writing %q: %v", filename, err)
}
} else {
- t.Errorf("generated file content does not match:\n%s", string(d))
+ t.Errorf("file on disk in %s is stale:\n%s", dstDir, d)
}
}
}
diff --git a/src/go/types/hilbert_test.go b/src/go/types/hilbert_test.go
index 434d78f929..afd7ee28bd 100644
--- a/src/go/types/hilbert_test.go
+++ b/src/go/types/hilbert_test.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/hilbert_test.go
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/infer.go b/src/go/types/infer.go
index 3a3e5de4dd..76c3c72a1a 100644
--- a/src/go/types/infer.go
+++ b/src/go/types/infer.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/infer.go
// Copyright 2018 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/initorder.go b/src/go/types/initorder.go
index d238440279..e539219773 100644
--- a/src/go/types/initorder.go
+++ b/src/go/types/initorder.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/initorder.go
// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/instantiate.go b/src/go/types/instantiate.go
index c7ea9e1c78..d53f5d3fba 100644
--- a/src/go/types/instantiate.go
+++ b/src/go/types/instantiate.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/instantiate.go
// Copyright 2021 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/instantiate_test.go b/src/go/types/instantiate_test.go
index 58dfa70131..67a2eea928 100644
--- a/src/go/types/instantiate_test.go
+++ b/src/go/types/instantiate_test.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/instantiate_test.go
// Copyright 2021 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/lookup.go b/src/go/types/lookup.go
index 68bfd885dc..d25662ac5e 100644
--- a/src/go/types/lookup.go
+++ b/src/go/types/lookup.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/lookup.go
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/main_test.go b/src/go/types/main_test.go
index fda9d102a3..0fac4f9791 100644
--- a/src/go/types/main_test.go
+++ b/src/go/types/main_test.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/main_test.go
// Copyright 2022 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/map.go b/src/go/types/map.go
index febb0d3a0b..3ed3188a3b 100644
--- a/src/go/types/map.go
+++ b/src/go/types/map.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/map.go
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/mono.go b/src/go/types/mono.go
index 063947ec2a..65f7aa65ce 100644
--- a/src/go/types/mono.go
+++ b/src/go/types/mono.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/mono.go
// Copyright 2021 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/named.go b/src/go/types/named.go
index 5fec5d1baf..b204b787db 100644
--- a/src/go/types/named.go
+++ b/src/go/types/named.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/named.go
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/object.go b/src/go/types/object.go
index 3558c187f2..7662e94aaf 100644
--- a/src/go/types/object.go
+++ b/src/go/types/object.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/object.go
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/object_test.go b/src/go/types/object_test.go
index 74acdaeeeb..c4f361e370 100644
--- a/src/go/types/object_test.go
+++ b/src/go/types/object_test.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/object_test.go
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/objset.go b/src/go/types/objset.go
index e6ea37566e..a2ecb717e4 100644
--- a/src/go/types/objset.go
+++ b/src/go/types/objset.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/objset.go
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/operand.go b/src/go/types/operand.go
index 883ee62394..e1ec376a5c 100644
--- a/src/go/types/operand.go
+++ b/src/go/types/operand.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/operand.go
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/package.go b/src/go/types/package.go
index 0f52d5f489..ac0c2e2270 100644
--- a/src/go/types/package.go
+++ b/src/go/types/package.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/package.go
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/pointer.go b/src/go/types/pointer.go
index 5b45ab7755..633f46b3fb 100644
--- a/src/go/types/pointer.go
+++ b/src/go/types/pointer.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/pointer.go
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/predicates.go b/src/go/types/predicates.go
index e1a32143f1..07d07f9f12 100644
--- a/src/go/types/predicates.go
+++ b/src/go/types/predicates.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/predicates.go
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/scope.go b/src/go/types/scope.go
index 08d94e55a8..476b26ac3f 100644
--- a/src/go/types/scope.go
+++ b/src/go/types/scope.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/scope.go
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/selection.go b/src/go/types/selection.go
index 18d3204fb1..6f8da7afe7 100644
--- a/src/go/types/selection.go
+++ b/src/go/types/selection.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/selection.go
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/sizes.go b/src/go/types/sizes.go
index 9e377fe2df..51ea224f0b 100644
--- a/src/go/types/sizes.go
+++ b/src/go/types/sizes.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/sizes.go
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/slice.go b/src/go/types/slice.go
index 934549c2d4..aad6450a6f 100644
--- a/src/go/types/slice.go
+++ b/src/go/types/slice.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/slice.go
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/subst.go b/src/go/types/subst.go
index 00796ac924..1d180abb65 100644
--- a/src/go/types/subst.go
+++ b/src/go/types/subst.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/subst.go
// Copyright 2018 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/termlist.go b/src/go/types/termlist.go
index 9bc631c0e6..e17476f521 100644
--- a/src/go/types/termlist.go
+++ b/src/go/types/termlist.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/termlist.go
// Copyright 2021 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/termlist_test.go b/src/go/types/termlist_test.go
index cf0c190516..9e1e0bc441 100644
--- a/src/go/types/termlist_test.go
+++ b/src/go/types/termlist_test.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/termlist_test.go
// Copyright 2021 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/tuple.go b/src/go/types/tuple.go
index e5e3914bb2..7b391b27a1 100644
--- a/src/go/types/tuple.go
+++ b/src/go/types/tuple.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/tuple.go
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/typelists.go b/src/go/types/typelists.go
index c000de2272..a857ea02a9 100644
--- a/src/go/types/typelists.go
+++ b/src/go/types/typelists.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/typelists.go
// Copyright 2021 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/typeparam.go b/src/go/types/typeparam.go
index a13f86c213..8c960311cd 100644
--- a/src/go/types/typeparam.go
+++ b/src/go/types/typeparam.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/typeparam.go
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/typeset.go b/src/go/types/typeset.go
index 84eb83fb5f..eb37de849a 100644
--- a/src/go/types/typeset.go
+++ b/src/go/types/typeset.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/typeset.go
// Copyright 2021 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/typestring.go b/src/go/types/typestring.go
index 210ab0515f..8ce9e86994 100644
--- a/src/go/types/typestring.go
+++ b/src/go/types/typestring.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/typestring.go
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/typeterm.go b/src/go/types/typeterm.go
index c86442c43f..1cd4e1651f 100644
--- a/src/go/types/typeterm.go
+++ b/src/go/types/typeterm.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/typeterm.go
// Copyright 2021 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/typeterm_test.go b/src/go/types/typeterm_test.go
index c6370f44fe..543986ca14 100644
--- a/src/go/types/typeterm_test.go
+++ b/src/go/types/typeterm_test.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/typeterm_test.go
// Copyright 2021 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/under.go b/src/go/types/under.go
index 3838528b53..9f9740e7c3 100644
--- a/src/go/types/under.go
+++ b/src/go/types/under.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/under.go
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/unify.go b/src/go/types/unify.go
index ffb5b4a74a..b93f9966f8 100644
--- a/src/go/types/unify.go
+++ b/src/go/types/unify.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/unify.go
// Copyright 2020 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/universe.go b/src/go/types/universe.go
index 8154d29053..9a882896c9 100644
--- a/src/go/types/universe.go
+++ b/src/go/types/universe.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/universe.go
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/util_test.go b/src/go/types/util_test.go
index 70d376f0bb..13944426aa 100644
--- a/src/go/types/util_test.go
+++ b/src/go/types/util_test.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/util_test.go
// Copyright 2023 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/src/go/types/validtype.go b/src/go/types/validtype.go
index 4fc46faabd..f87b82c439 100644
--- a/src/go/types/validtype.go
+++ b/src/go/types/validtype.go
@@ -1,4 +1,5 @@
// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/validtype.go
// Copyright 2022 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style