diff options
author | Cherry Mui <cherryyz@google.com> | 2021-08-10 11:02:34 -0400 |
---|---|---|
committer | Cherry Mui <cherryyz@google.com> | 2021-08-10 16:07:37 +0000 |
commit | 2e250cc95760e75a3f1fa082920eecd9f88fd096 (patch) | |
tree | 17ef32105d8e320c5bec3ecc3c8c69e75e1a4fc0 /src/cmd/vendor/golang.org/x/tools/internal/typeparams/common.go | |
parent | 2fbf6aafe7de215a1d03e14aa488aa8fd31f56a7 (diff) | |
download | go-2e250cc95760e75a3f1fa082920eecd9f88fd096.tar.gz go-2e250cc95760e75a3f1fa082920eecd9f88fd096.zip |
[dev.typeparams] cmd: update vendored golang.org/x/tools to 337cebd2c151
Update vendored golang.org/x/tools repo to pick up CL 339250 for
assembly function check for register ABI.
This is done with
cd GOROOT/cmd
go get golang.org/x/tools@master
go mod tidy
go mod vendor
Update cmd/vet tests as the error ouput changes in CL 301949.
The error message now includes full package-qualified name.
Change-Id: I52dc7223aee9e011214254488bacf02dc5b4c2ef
Reviewed-on: https://go-review.googlesource.com/c/go/+/341149
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Diffstat (limited to 'src/cmd/vendor/golang.org/x/tools/internal/typeparams/common.go')
-rw-r--r-- | src/cmd/vendor/golang.org/x/tools/internal/typeparams/common.go | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/cmd/vendor/golang.org/x/tools/internal/typeparams/common.go b/src/cmd/vendor/golang.org/x/tools/internal/typeparams/common.go new file mode 100644 index 0000000000..9fc6b4beb8 --- /dev/null +++ b/src/cmd/vendor/golang.org/x/tools/internal/typeparams/common.go @@ -0,0 +1,25 @@ +// Copyright 2021 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package typeparams provides functions to work indirectly with type parameter +// data stored in go/ast and go/types objects, while these API are guarded by a +// build constraint. +// +// This package exists to make it easier for tools to work with generic code, +// while also compiling against older Go versions. +package typeparams + +import ( + "go/ast" + "go/token" +) + +// A IndexExprData holds data from both ast.IndexExpr and the new +// ast.MultiIndexExpr, which was introduced in Go 1.18. +type IndexExprData struct { + X ast.Expr // expression + Lbrack token.Pos // position of "[" + Indices []ast.Expr // index expressions + Rbrack token.Pos // position of "]" +} |