Skip to content

Commit 3f1e724

Browse files
committed
cmd/guru: remove test assertions involving unsafe to fix the build
Go 1.17 adds the unsafe.Add and unsafe.Slice functions, which causes the guru describe assertions about unsafe to either fail at 1.17 or fail at earlier Go versions. This is causing the longtest builds to break. Remove them for now. If we remember, we can add them back once we no longer support 1.16. Fixes golang/go#45778 Change-Id: Ie72355fbab8e614c0150097c84c796e78d968839 Reviewed-on: https://go-review.googlesource.com/c/tools/+/313251 Trust: Robert Findley <[email protected]> Run-TryBot: Robert Findley <[email protected]> Reviewed-by: Matthew Dempsky <[email protected]> Reviewed-by: Rebecca Stambler <[email protected]> gopls-CI: kokoro <[email protected]> TryBot-Result: Go Bot <[email protected]>
1 parent cf354b6 commit 3f1e724

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

cmd/guru/testdata/src/describe/main.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ import (
1010
"lib"
1111
"nosuchpkg" // @describe badimport1 "nosuchpkg"
1212
nosuchpkg2 "nosuchpkg" // @describe badimport2 "nosuchpkg2"
13-
_ "unsafe" // @describe unsafe "unsafe"
13+
// The unsafe package changed in Go 1.17 with the addition of
14+
// unsafe.Add and unsafe.Slice. While we still support older versions
15+
// of Go, the test case below cannot be enabled.
16+
// _ "unsafe" // @describe unsafe "unsafe"
1417
)
1518

1619
var _ nosuchpkg.T

cmd/guru/testdata/src/describe/main.golden

-7
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,6 @@ import of package "nosuchpkg"
2020
-------- @describe badimport2 --------
2121
reference to package "nosuchpkg"
2222

23-
-------- @describe unsafe --------
24-
import of package "unsafe"
25-
builtin Alignof
26-
builtin Offsetof
27-
type Pointer unsafe.Pointer
28-
builtin Sizeof
29-
3023
-------- @describe type-ref-builtin --------
3124
reference to built-in type float64
3225

0 commit comments

Comments
 (0)