aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlan Donovan <adonovan@google.com>2025-09-12 16:04:24 -0400
committerGopher Robot <gobot@golang.org>2025-09-25 11:38:17 -0700
commit56067e31f257940113c0fdb2bb8e818d1b62881e (patch)
treecb82991cd9b7c48ecab3cfc39ab92fc272a479b0 /src
parentd70ad4e740e24b4b76961c4b56d698fa23668aa2 (diff)
downloadgo-56067e31f257940113c0fdb2bb8e818d1b62881e.tar.xz
std: remove unused declarations
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>
Diffstat (limited to 'src')
-rw-r--r--src/runtime/stack_test.go2
-rw-r--r--src/runtime/string_test.go2
-rw-r--r--src/sort/sort_slices_benchmark_test.go8
-rw-r--r--src/text/template/parse/lex_test.go12
4 files changed, 1 insertions, 23 deletions
diff --git a/src/runtime/stack_test.go b/src/runtime/stack_test.go
index a7c6fc8e5a..eb8de47e86 100644
--- a/src/runtime/stack_test.go
+++ b/src/runtime/stack_test.go
@@ -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)
}
diff --git a/src/runtime/string_test.go b/src/runtime/string_test.go
index 522a502a1c..942e7ac04a 100644
--- a/src/runtime/string_test.go
+++ b/src/runtime/string_test.go
@@ -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
diff --git a/src/sort/sort_slices_benchmark_test.go b/src/sort/sort_slices_benchmark_test.go
index 6fea511284..b261eeb7db 100644
--- a/src/sort/sort_slices_benchmark_test.go
+++ b/src/sort/sort_slices_benchmark_test.go
@@ -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++ {
diff --git a/src/text/template/parse/lex_test.go b/src/text/template/parse/lex_test.go
index 20f9698fa4..bd535c4ce5 100644
--- a/src/text/template/parse/lex_test.go
+++ b/src/text/template/parse/lex_test.go
@@ -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
-}