]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile/internal/types: remove IterFields
authorMatthew Dempsky <mdempsky@google.com>
Fri, 7 Apr 2017 20:48:13 +0000 (13:48 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Fri, 7 Apr 2017 22:11:41 +0000 (22:11 +0000)
No longer needed after previous CLs.

Change-Id: I9dd1040f3f28363c44434a810cbd7061cf6a028f
Reviewed-on: https://go-review.googlesource.com/39857
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dave Cheney <dave@cheney.net>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/cmd/compile/internal/types/type.go

index 386d2f8d5737cfbfb079e02b4d487a8c3d8af001..196b7b751f6ad2de5f0736cc39587e0051b81085 100644 (file)
@@ -671,37 +671,6 @@ func (f *Field) Copy() *Field {
        return &nf
 }
 
-// Iter provides an abstraction for iterating across struct fields and
-// interface methods.
-type Iter struct {
-       s []*Field
-}
-
-// IterFields returns the first field or method in struct or interface type t
-// and an Iter value to continue iterating across the rest.
-func IterFields(t *Type) (*Field, Iter) {
-       return t.Fields().Iter()
-}
-
-// Iter returns the first field in fs and an Iter value to continue iterating
-// across its successor fields.
-// Deprecated: New code should use Slice instead.
-func (fs *Fields) Iter() (*Field, Iter) {
-       i := Iter{s: fs.Slice()}
-       f := i.Next()
-       return f, i
-}
-
-// Next returns the next field or method, if any.
-func (i *Iter) Next() *Field {
-       if len(i.s) == 0 {
-               return nil
-       }
-       f := i.s[0]
-       i.s = i.s[1:]
-       return f
-}
-
 func (t *Type) wantEtype(et EType) {
        if t.Etype != et {
                Fatalf("want %v, but have %v", et, t)