]> Cypherpunks repositories - gostls13.git/commitdiff
std: remove unused declarations
authorAlan Donovan <adonovan@google.com>
Fri, 12 Sep 2025 20:04:24 +0000 (16:04 -0400)
committerGopher Robot <gobot@golang.org>
Thu, 25 Sep 2025 18:38:17 +0000 (11:38 -0700)
One function was unused by mistake, and is now used as intended.

Change-Id: I42ae7481c6f794b310bdac656ea525bd882f146e
Reviewed-on: https://go-review.googlesource.com/c/go/+/706815
Auto-Submit: Alan Donovan <adonovan@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

src/runtime/stack_test.go
src/runtime/string_test.go
src/sort/sort_slices_benchmark_test.go
src/text/template/parse/lex_test.go

index a7c6fc8e5a06cdf24697fc256b53cbda519c9f21..eb8de47e86363541f8db8057ccb5cbe28a03997d 100644 (file)
@@ -290,7 +290,7 @@ func setBig(p *int, x int, b bigBuf) {
 func TestDeferPtrsPanic(t *testing.T) {
        for i := 0; i < 100; i++ {
                c := make(chan int, 1)
-               go testDeferPtrsGoexit(c, i)
+               go testDeferPtrsPanic(c, i)
                if n := <-c; n != 42 {
                        t.Fatalf("defer's stack references were not adjusted appropriately (i=%d n=%d)", i, n)
                }
index 522a502a1cfe588134141d5b36682753aa948373..942e7ac04a7bf28c63250db7d3f9ebe123634ef3 100644 (file)
@@ -388,8 +388,6 @@ func TestString2Slice(t *testing.T) {
        }
 }
 
-const intSize = 32 << (^uint(0) >> 63)
-
 func TestParseByteCount(t *testing.T) {
        for _, test := range []struct {
                in  string
index 6fea511284570fa3af9c234f2690f572bba6f51d..b261eeb7db69cb4be0379fe3f2e046ccf9983d01 100644 (file)
@@ -34,14 +34,6 @@ func makeSortedInts(n int) []int {
        return ints
 }
 
-func makeReversedInts(n int) []int {
-       ints := make([]int, n)
-       for i := 0; i < n; i++ {
-               ints[i] = n - i
-       }
-       return ints
-}
-
 func makeSortedStrings(n int) []string {
        x := make([]string, n)
        for i := 0; i < n; i++ {
index 20f9698fa4790fe61fb14d946a9773c022fba122..bd535c4ce5700511a3df9065c0105302392a9851 100644 (file)
@@ -578,15 +578,3 @@ func TestPos(t *testing.T) {
                }
        }
 }
-
-// parseLexer is a local version of parse that lets us pass in the lexer instead of building it.
-// We expect an error, so the tree set and funcs list are explicitly nil.
-func (t *Tree) parseLexer(lex *lexer) (tree *Tree, err error) {
-       defer t.recover(&err)
-       t.ParseName = t.Name
-       t.startParse(nil, lex, map[string]*Tree{})
-       t.parse()
-       t.add()
-       t.stopParse()
-       return t, nil
-}