diff --git a/loader/goroot.go b/loader/goroot.go index 3d3dee0d1..00a7124d8 100644 --- a/loader/goroot.go +++ b/loader/goroot.go @@ -261,10 +261,6 @@ func pathsToOverride(goMinor int, needsSyscallPackage bool) map[string]bool { "unique/": false, } - if goMinor <= 22 { - paths["iter]"] = false - } - if goMinor >= 19 { paths["crypto/internal/"] = true paths["crypto/internal/boring/"] = true diff --git a/src/iter/iter.go b/src/iter/iter.go deleted file mode 100644 index bbeb4e1d1..000000000 --- a/src/iter/iter.go +++ /dev/null @@ -1,17 +0,0 @@ -//go:build !go1.23 - -// Delete this file when TinyGo drops support for Go 1.22. - -package iter - -// Seq is an iterator over sequences of individual values. -// When called as seq(yield), seq calls yield(v) for each value v in the sequence, -// stopping early if yield returns false. -// See the [iter] package documentation for more details. -type Seq[V any] func(yield func(V) bool) - -// Seq2 is an iterator over sequences of pairs of values, most commonly key-value pairs. -// When called as seq(yield), seq calls yield(k, v) for each pair (k, v) in the sequence, -// stopping early if yield returns false. -// See the [iter] package documentation for more details. -type Seq2[K, V any] func(yield func(K, V) bool) diff --git a/src/reflect/iter.go b/src/reflect/iter.go index 90a9469bb..dd0b8de20 100644 --- a/src/reflect/iter.go +++ b/src/reflect/iter.go @@ -1,3 +1,5 @@ +//go:build go1.23 + // Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file.