]> Cypherpunks repositories - gostls13.git/commitdiff
go/types, types2: delete TypeList.String
authorRobert Griesemer <gri@golang.org>
Fri, 28 Jan 2022 05:26:27 +0000 (21:26 -0800)
committerRobert Griesemer <gri@golang.org>
Fri, 28 Jan 2022 22:21:55 +0000 (22:21 +0000)
This method is unused and was not discussed in the API
proposals. Note that all error output goes through the
local sprintf which handles arguments specially.

Fixes #50760.

Change-Id: Iae66b0253cc0ece037d3d280951dc2d223c119fb
Reviewed-on: https://go-review.googlesource.com/c/go/+/381634
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
api/go1.18.txt
src/cmd/compile/internal/types2/typelists.go
src/go/types/typelists.go

index 7805d29eb79428d20551cc3e05ed73d93c94c8ea..2d05c3f41cf83260c4072087fe1c1fabc1158d02 100644 (file)
@@ -51,7 +51,6 @@ pkg go/types, method (*Term) Tilde() bool
 pkg go/types, method (*Term) Type() Type
 pkg go/types, method (*TypeList) At(int) Type
 pkg go/types, method (*TypeList) Len() int
-pkg go/types, method (*TypeList) String() string
 pkg go/types, method (*TypeParam) Constraint() Type
 pkg go/types, method (*TypeParam) Index() int
 pkg go/types, method (*TypeParam) Obj() *TypeName
index 0b77edbde251afaa5bc5094a1c0e1d32b0793e38..a2aba4a9a553c9cdcd0895d747e0222afc14bd6d 100644 (file)
@@ -4,8 +4,6 @@
 
 package types2
 
-import "bytes"
-
 // TypeParamList holds a list of type parameters.
 type TypeParamList struct{ tparams []*TypeParam }
 
@@ -54,15 +52,6 @@ func (l *TypeList) list() []Type {
        return l.types
 }
 
-func (l *TypeList) String() string {
-       if l == nil || len(l.types) == 0 {
-               return "[]"
-       }
-       var buf bytes.Buffer
-       newTypeWriter(&buf, nil).typeList(l.types)
-       return buf.String()
-}
-
 // ----------------------------------------------------------------------------
 // Implementation
 
index aea19e946dd5779f941ac546ee1b27b59c3eedca..0f241356c33f111bf3bef1f6126474f2ff23efbe 100644 (file)
@@ -4,8 +4,6 @@
 
 package types
 
-import "bytes"
-
 // TypeParamList holds a list of type parameters.
 type TypeParamList struct{ tparams []*TypeParam }
 
@@ -54,15 +52,6 @@ func (l *TypeList) list() []Type {
        return l.types
 }
 
-func (l *TypeList) String() string {
-       if l == nil || len(l.types) == 0 {
-               return "[]"
-       }
-       var buf bytes.Buffer
-       newTypeWriter(&buf, nil).typeList(l.types)
-       return buf.String()
-}
-
 // ----------------------------------------------------------------------------
 // Implementation