mirror of
https://github.com/mjl-/mox.git
synced 2025-07-19 23:46:35 +03:00
update golang.org/x dependencies
This commit is contained in:
20
vendor/golang.org/x/tools/go/packages/packages.go
generated
vendored
20
vendor/golang.org/x/tools/go/packages/packages.go
generated
vendored
@ -59,10 +59,10 @@ import (
|
||||
//
|
||||
// Unfortunately there are a number of open bugs related to
|
||||
// interactions among the LoadMode bits:
|
||||
// - https://github.com/golang/go/issues/56633
|
||||
// - https://github.com/golang/go/issues/56677
|
||||
// - https://github.com/golang/go/issues/58726
|
||||
// - https://github.com/golang/go/issues/63517
|
||||
// - https://go.dev/issue/56633
|
||||
// - https://go.dev/issue/56677
|
||||
// - https://go.dev/issue/58726
|
||||
// - https://go.dev/issue/63517
|
||||
type LoadMode int
|
||||
|
||||
const (
|
||||
@ -141,6 +141,8 @@ const (
|
||||
LoadAllSyntax = LoadSyntax | NeedDeps
|
||||
|
||||
// Deprecated: NeedExportsFile is a historical misspelling of NeedExportFile.
|
||||
//
|
||||
//go:fix inline
|
||||
NeedExportsFile = NeedExportFile
|
||||
)
|
||||
|
||||
@ -161,7 +163,7 @@ type Config struct {
|
||||
// If the user provides a logger, debug logging is enabled.
|
||||
// If the GOPACKAGESDEBUG environment variable is set to true,
|
||||
// but the logger is nil, default to log.Printf.
|
||||
Logf func(format string, args ...interface{})
|
||||
Logf func(format string, args ...any)
|
||||
|
||||
// Dir is the directory in which to run the build system's query tool
|
||||
// that provides information about the packages.
|
||||
@ -564,13 +566,13 @@ type ModuleError struct {
|
||||
}
|
||||
|
||||
func init() {
|
||||
packagesinternal.GetDepsErrors = func(p interface{}) []*packagesinternal.PackageError {
|
||||
packagesinternal.GetDepsErrors = func(p any) []*packagesinternal.PackageError {
|
||||
return p.(*Package).depsErrors
|
||||
}
|
||||
packagesinternal.SetModFile = func(config interface{}, value string) {
|
||||
packagesinternal.SetModFile = func(config any, value string) {
|
||||
config.(*Config).modFile = value
|
||||
}
|
||||
packagesinternal.SetModFlag = func(config interface{}, value string) {
|
||||
packagesinternal.SetModFlag = func(config any, value string) {
|
||||
config.(*Config).modFlag = value
|
||||
}
|
||||
packagesinternal.TypecheckCgo = int(typecheckCgo)
|
||||
@ -739,7 +741,7 @@ func newLoader(cfg *Config) *loader {
|
||||
if debug {
|
||||
ld.Config.Logf = log.Printf
|
||||
} else {
|
||||
ld.Config.Logf = func(format string, args ...interface{}) {}
|
||||
ld.Config.Logf = func(format string, args ...any) {}
|
||||
}
|
||||
}
|
||||
if ld.Config.Mode == 0 {
|
||||
|
20
vendor/golang.org/x/tools/go/types/typeutil/map.go
generated
vendored
20
vendor/golang.org/x/tools/go/types/typeutil/map.go
generated
vendored
@ -257,10 +257,13 @@ func (h hasher) hash(t types.Type) uint32 {
|
||||
}
|
||||
|
||||
tparams := t.TypeParams()
|
||||
for i := range tparams.Len() {
|
||||
h.inGenericSig = true
|
||||
tparam := tparams.At(i)
|
||||
hash += 7 * h.hash(tparam.Constraint())
|
||||
if n := tparams.Len(); n > 0 {
|
||||
h.inGenericSig = true // affects constraints, params, and results
|
||||
|
||||
for i := range n {
|
||||
tparam := tparams.At(i)
|
||||
hash += 7 * h.hash(tparam.Constraint())
|
||||
}
|
||||
}
|
||||
|
||||
return hash + 3*h.hashTuple(t.Params()) + 5*h.hashTuple(t.Results())
|
||||
@ -386,8 +389,13 @@ func (hasher) hashTypeName(tname *types.TypeName) uint32 {
|
||||
// path, and whether or not it is a package-level typename. It
|
||||
// is rare for a package to define multiple local types with
|
||||
// the same name.)
|
||||
hash := uintptr(unsafe.Pointer(tname))
|
||||
return uint32(hash ^ (hash >> 32))
|
||||
ptr := uintptr(unsafe.Pointer(tname))
|
||||
if unsafe.Sizeof(ptr) == 8 {
|
||||
hash := uint64(ptr)
|
||||
return uint32(hash ^ (hash >> 32))
|
||||
} else {
|
||||
return uint32(ptr)
|
||||
}
|
||||
}
|
||||
|
||||
// shallowHash computes a hash of t without looking at any of its
|
||||
|
Reference in New Issue
Block a user