1
0
mirror of https://github.com/golang/go synced 2024-09-23 21:30:18 -06:00

test: fix inline.go to pass linux-amd64-noopt

Updates #33485.

Change-Id: I3330860cdff1e9797466a7630bcdb7792c465b06
Reviewed-on: https://go-review.googlesource.com/c/go/+/254938
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
Matthew Dempsky 2020-09-14 19:24:55 -07:00
parent d20298e1c7
commit bae9cf6517

View File

@ -10,7 +10,6 @@
package foo
import (
"errors"
"runtime"
"unsafe"
)
@ -50,7 +49,7 @@ func j(x int) int { // ERROR "can inline j"
}
}
var somethingWrong error = errors.New("something went wrong") // ERROR "can inline init" "inlining call to errors.New" "errors.errorString.* escapes to heap"
var somethingWrong error
// local closures can be inlined
func l(x, y int) (int, int, error) {