Skip to content

Commit

Permalink
slices: add old build constraint syntax to help old go versions
Browse files Browse the repository at this point in the history
When a project transitively depends on x/exp/slices,
go1.16 is confused and fails with errors like:

"//go:build comment without // +build comment"

Even when import of x/exp/slices guarded with build tags, so this
is imported only when compiling with go1.18, this error is unavoidable.
Let's wait a bit longer and help users who are stuck with old go.

Updates golang/go#51436

Change-Id: I7ba589644475f55585c11ba1f7650c5ede6bc637
Reviewed-on: https://go-review.googlesource.com/c/exp/+/448996
TryBot-Result: Gopher Robot <[email protected]>
Reviewed-by: Bryan Mills <[email protected]>
Run-TryBot: Hyang-Ah Hana Kim <[email protected]>
  • Loading branch information
hyangah committed Nov 9, 2022
1 parent 9ce248d commit fc8884a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions slices/slices_race_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// license that can be found in the LICENSE file.

//go:build race
// +build race

package slices

Expand Down

0 comments on commit fc8884a

Please sign in to comment.