From 9ff00398489d9eb1822b3de028cd6ccf5674ebb3 Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Thu, 27 Jan 2022 15:00:57 -0800 Subject: [PATCH] go/types, types2: delete _TypeSet.includes - not used (cleanup) Change-Id: Ia324c6185e36efd4ea7dc92d7c2233fec8f5a55f Reviewed-on: https://go-review.googlesource.com/c/go/+/381494 Trust: Robert Griesemer Reviewed-by: Robert Findley --- src/cmd/compile/internal/types2/typeset.go | 5 ----- src/go/types/typeset.go | 5 ----- 2 files changed, 10 deletions(-) diff --git a/src/cmd/compile/internal/types2/typeset.go b/src/cmd/compile/internal/types2/typeset.go index 348b8150d3..7a1e1bdf2f 100644 --- a/src/cmd/compile/internal/types2/typeset.go +++ b/src/cmd/compile/internal/types2/typeset.go @@ -107,11 +107,6 @@ func (s *_TypeSet) hasTerms() bool { return !s.terms.isEmpty() && !s.terms.isAll // singleType returns the single type in s if there is exactly one; otherwise the result is nil. func (s *_TypeSet) singleType() Type { return s.terms.singleType() } -// includes reports whether t ∈ s. -// TODO(gri) This function is not used anywhere anymore. Remove once we -// are clear that we don't need it elsewhere in the future. -func (s *_TypeSet) includes(t Type) bool { return s.terms.includes(t) } - // subsetOf reports whether s1 ⊆ s2. func (s1 *_TypeSet) subsetOf(s2 *_TypeSet) bool { return s1.terms.subsetOf(s2.terms) } diff --git a/src/go/types/typeset.go b/src/go/types/typeset.go index 2317177f03..4598daacb0 100644 --- a/src/go/types/typeset.go +++ b/src/go/types/typeset.go @@ -105,11 +105,6 @@ func (s *_TypeSet) hasTerms() bool { return !s.terms.isEmpty() && !s.terms.isAll // singleType returns the single type in s if there is exactly one; otherwise the result is nil. func (s *_TypeSet) singleType() Type { return s.terms.singleType() } -// includes reports whether t ∈ s. -// TODO(gri) This function is not used anywhere anymore. Remove once we -// are clear that we don't need it elsewhere in the future. -func (s *_TypeSet) includes(t Type) bool { return s.terms.includes(t) } - // subsetOf reports whether s1 ⊆ s2. func (s1 *_TypeSet) subsetOf(s2 *_TypeSet) bool { return s1.terms.subsetOf(s2.terms) } -- 2.50.0