mirror of
https://github.com/golang/go
synced 2024-11-11 23:20:24 -07:00
go/types, types2: delete TypeList.String
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>
This commit is contained in:
parent
8f7d96f5bc
commit
b37c6e1547
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user