Skip to content

Commit b00d49e

Browse files
committed
internal/refactor/inline: don't assume strings.Index calls internal/bytealg
I'm refactoring part of the strings package, and this assumption won't hold after. Change the test to use syscall.ByteSliceFromString; syscall is mostly frozen and hopefully unlikely to change. Change-Id: I0bb536b32922c6d705d0ff7369f03c55a169d37f Reviewed-on: https://go-review.googlesource.com/c/tools/+/581595 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent 1523441 commit b00d49e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
std packages are a special case of the internal package check.
33

4-
This test assumes that strings.Index refers to internal/bytealg.
4+
This test assumes that syscall.ByteSliceFromString refers to internal/bytealg.
55

66
-- go.mod --
77
module testdata
@@ -10,6 +10,6 @@ go 1.12
1010
-- a/a.go --
1111
package a
1212

13-
import "strings"
13+
import "syscall"
1414

15-
var _ = strings.Index("", "") //@ inline(re"Index", re`inaccessible package "internal/bytealg"`)
15+
var _, _ = syscall.ByteSliceFromString("") //@ inline(re"ByteSliceFromString", re`inaccessible package "internal/bytealg"`)

0 commit comments

Comments
 (0)