go/internal/gcimporter: set iexportVersionGenerics to 2
Now that the standard library importer/exporter has been updated for a
while, we can set iexportVersionGenerics to its final value -- 2.
Fixes golang/go#47654
Change-Id: I27eca4cf2b82b7c09e2b6a754c6e5e5af71a7b29
Reviewed-on: https://go-review.googlesource.com/c/tools/+/377554
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
Trust: Dan Scales <danscales@google.com>
diff --git a/go/internal/gcimporter/iimport.go b/go/internal/gcimporter/iimport.go
index cdb332c..475b04d 100644
--- a/go/internal/gcimporter/iimport.go
+++ b/go/internal/gcimporter/iimport.go
@@ -45,20 +45,11 @@
}
// Keep this in sync with constants in iexport.go.
-//
-// Temporarily, the x/tools importer accepts generic code at both version 1 and
-// 2. However, version 2 contains some breaking changes on top of version 1:
-// - the 'implicit' bit is added to exported constraints
-// - a 'kind' byte is added to constant values (not yet done)
-//
-// Once we've completed the bump to version 2 in the standard library, we'll
-// remove support for generics here at version 1.
const (
- iexportVersionGo1_11 = 0
- iexportVersionPosCol = 1
- iexportVersionGo1_18 = 2
- // TODO: before release, change this back to 2.
- iexportVersionGenerics = iexportVersionPosCol
+ iexportVersionGo1_11 = 0
+ iexportVersionPosCol = 1
+ iexportVersionGo1_18 = 2
+ iexportVersionGenerics = 2
)
type ident struct {