mirror of https://github.com/golang/go.git
go/callgraph/vta/internal/trie: fix build with go1.12
- Convert shift count to unsigned to make go1.12 happy. https://github.com/golang/proposal/blob/master/design/19113-signed-shift-counts.md - Require go1.13+ for tests that use the new language features introduced in go1.13. https://golang.org/doc/go1.13#language Change-Id: I30dc5ee44ccf1a76ce30f352751316efdebc5929 Reviewed-on: https://go-review.googlesource.com/c/tools/+/365634 Trust: Hyang-Ah Hana Kim <hyangah@gmail.com> Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Tim King <taking@google.com>
This commit is contained in:
parent
d0c72119bb
commit
c2c92fd21d
|
|
@ -46,7 +46,7 @@ func branchingBit(x, y prefix) bitpos {
|
|||
if p == 0 {
|
||||
return 0
|
||||
}
|
||||
return 1 << (bits.Len64(uint64(p)) - 1)
|
||||
return bitpos(1) << uint(bits.Len64(uint64(p))-1) // uint conversion needed for go1.12
|
||||
}
|
||||
|
||||
// zeroBit returns true if k has a 0 bit at position `b`.
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build go1.13
|
||||
// +build go1.13
|
||||
|
||||
package trie
|
||||
|
||||
import (
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build go1.13
|
||||
// +build go1.13
|
||||
|
||||
package trie
|
||||
|
||||
import (
|
||||
|
|
|
|||
Loading…
Reference in New Issue