Skip to content

Commit

Permalink
remove test linknames into std
Browse files Browse the repository at this point in the history
As of Go 1.23, these are forbidden by https://go.dev/issue/67401.

Updates burrowers#859.
  • Loading branch information
mvdan committed Sep 4, 2024
1 parent 51ee956 commit 92a7b5f
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions testdata/script/linkname.txtar
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,6 @@ import (
"test/main/imported"
)

// A linkname to an external non-obfuscated func.
//go:linkname byteIndex strings.IndexByte
func byteIndex(s string, c byte) int

// A linkname to an external non-obfuscated non-exported func.
//go:linkname interfaceEqual os/exec.interfaceEqual
func interfaceEqual(a, b any) bool

// A linkname to an external obfuscated func.
//go:linkname obfuscatedFunc test/main/imported.ObfuscatedFuncImpl
func obfuscatedFunc() string
Expand Down Expand Up @@ -85,9 +77,6 @@ func renamedFunc() string
func tagline() string

func main() {
println(byteIndex("01234", '3'))
println(interfaceEqual("Sephiroth", 7))

println(obfuscatedFunc())

r := imported.Receiver{Field: "field value"}
Expand Down Expand Up @@ -157,8 +146,6 @@ func chungify() string {
return "featuring Dante from the Devil May Cry series"
}
-- main.stderr --
3
false
obfuscated func
obfuscated method: field value
unobfuscated method: field value
Expand Down

0 comments on commit 92a7b5f

Please sign in to comment.