1
0
mirror of https://github.com/golang/go synced 2024-11-22 10:54:46 -07:00
go/test/linkname.dir/linkname1.go
nimelehin a3bb28e5ff cmd/compile: allow inlining of ORANGE
Updates #14768

Change-Id: I33831f616eae5eeb099033e2b9cf90fa70d6ca86
Reviewed-on: https://go-review.googlesource.com/c/go/+/356869
Run-TryBot: Alberto Donizetti <alb.donizetti@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
Trust: Dan Scales <danscales@google.com>
Trust: Alberto Donizetti <alb.donizetti@gmail.com>
2021-10-28 14:25:03 +00:00

11 lines
174 B
Go

package x
func indexByte(xs []byte, b byte) int { // ERROR "xs does not escape" "can inline indexByte"
for i, x := range xs {
if x == b {
return i
}
}
return -1
}