[gopls-release-branch.0.7] all: merge master into gopls-release-branch.0.7

acac93965 go/analysis/passes/bools: add typeparams test
ac2ed988c go/analysis/passes/printf: warn against using non-error interface values with %w
378b9e1d5 internal/lsp/analysis: add typeparams tests for nonewvars and noresultvalues
24389d4d0 internal/lsp: use the correct dynamic registration booleans
074820e17 go/analysis/passes/usesgenerics: a new analysis to detect generic code
94178a22b internal/lsp: use source.Offset instead of tok.Offset
0b930fbaf cmd/goimports: recommend go install instead of go get in docs
c83725bbd go/analysis/passes/loopclosure: add typeparams test
18fa84021 internal/lsp/semantic: prepare for generics
1af23bdac go/analysis/passes/assign: add typeparams test
ee04797aa go/types/objectpath: canonical order for methods
c5188f24a gopls/doc/advanced.md: update unstable version installation instruction
d477ef3e9 go/analysis/passes/atomic: add a test that uses typeparams
2dc275501 internal/lsp/protocol: update LSP definitions and stubs
81efdbcac cover: add function to parse profiles from an io.Reader
36e7bf96e internal/lsp/analysis/unusedparams: add tests for generics
db89b5a19 internal/lsp: handle nil pointer in fixInitStmt
ccaa90747 go/analysis/passes/unmarshal: allow unmarshalling to a type parameter
0ebff1a95 go/ast/astutil: update PathEnclosingInterval to handle type parameters
942994fc7 internal/typeparams: use alias rather than indirection for IndexListExpr
13c407cf4 go/ast/inspector: add support for the new IndexListExpr node
58ad7eb1a go/types/objectpath: add support for type parameters
3883e4a54 go/internal/gcimporter: allow both prefixes and subscripts for tparams
6f5fd9bf4 internal/lsp: add parameterized slice test for simplifyslice analysis
2189684b1 internal/typeparams: use NewSignatureType, IsMethodSet, and Context
e89823e06 x/tools/go/internal/gcimporter: exclude a file from TestImportTypeparamTests
1c35f2a5d internal/lsp/analysis: quick-fix to remove unnecessary type arguments
7d467dcfb internal/lsp: support go.work outside of experimental
d9648c991 go/analysis: test errorsas analysis with type params
d42c92b46 internal/lsp/analysis/fillreturns: skip any parameterized functions
5dbd5e40d internal/typeparams: filter out API diffs related to types.Environment
df9a164fb Revert "internal/typeparams: hide go1.18 API usage behind a build constraint"
0df0ca0f4 internal/typeparams: hide go1.18 API usage behind a build constraint
7898fe60e internal/lsp/analysis: move implementmissing logic into undeclared
da36f796b go/internal/gcimporter: skip typeparam import tests on unified builders
64bbad1f5 internal/lsp/debug: improve readability of session options
b182fdeb5 go/analysis/passes/tests: check example output
ba6b94c73 internal/lsp: add fields to anonymous struct info
939195fa0 go/ssa: skip the "constraints" package in TestStdlib
e1e06b848 go/internal/gcimporter: temporarily skip the contraints package on the unified builder
6d1e33f1d internal/lsp: handle panic in hoverRune by using token.Pos
c8db76165 internal/lsp/cache: keep going on failed analyzers
284795867 internal/lsp/analysis: add a useany analyzer
efaec4e63 go/pointer: skip tests that depend on an unstable API changed in Go 1.18
ecbcf3a28 go/callgraph/vta: improve support for function value flow
b98090b83 internal/lsp/analysis/implementmissing: add analyzer
0d12d39b8 internal/typeparams: update to the new Instances API
fe076c893 internal/typesinternal: document ReadGo116ErrorData
91c880c34 go/internal/gcimporter: add support for exporting the 1.18 export format
d2417d5c0 gopls/doc: add instructions for the new "kokoro rerun" feature
464a8874c internal/lsp/templates: replace panic by logging
a0016a2ad internal/lsp/diagnostics: avoid erroneous error message for orphaned files
7559231ed internal/lsp/command: fix typo in comment
2758b0478 gopls/api-diff: create api-diff command for gopls api
aba0c5f15 go/callgraph/vta: optimize scc type initialization
1a7ca9342 internal/lsp/source: update SuggestedFixFunc to accept source.Snapshot
76d449422 internal/lsp: fix panic in find references on Error
4ba3eff04 gopls/doc: remove -tags=typeparams from generic build instructions
02e523846 go/internal/gcimporter: rename instType to instanceType
0cffec9e3 go/internal/gcimporter: update iimport.go to support type parameters
5492d01d9 internal/lsp/testdata: update inferred.go to use hoverdef
92077074d go/internal/gcimporter: skip TestIExportData_stdlib on go1.18
cd7c003cd internal/lsp: add support for hovering runes
258ee27c3 internal/lsp/template: implement completions for template files
384e5daa5 go/ssa: keep the ops doc sorted alphabetically
e7de6523a internal/lsp: produce "method" in place of "member" as per the spec
915f62094 go/ssa: fix slice to array ptr conversions for named type
a568412ca go/callgraph/vta: fix call site computation bug
295a39ba3 internal/lsp: remove the TODO and add a test for the hover panic
c163c3172 gopls: add more instructions for working with Bazel and gopls
076821bd2 internal/typeparams: update MultiIndexExpr to IndexListExpr
2cae65cc5 internal/typeparams: follow changes to Type in the go/ast and go/types
0a6f08061 internal/lsp: check InRange before calling token.Offset
e5f719fbe internal/lsp/source: consider test variants when finding pkg from pos
360456621 go/analysis/passes/testinggoroutine: fix panic in goStmtFun
d39bbca0a gopls: consistently capitalize enum variants for symbolStyle
4e109c570 gopls: use new "codelenses" config key in docs over deprecated "codelens"
7391fc19f gopls/doc: update generic code section of advanced.md
3b801c8b8 internal/lsp: exclude node_modules in the workspace root by default

Change-Id: I9e6d85aa0a8506c63d082e1a73c749781dccf720
diff --git a/gopls/go.mod b/gopls/go.mod
index 127b722..0c4c6b9 100644
--- a/gopls/go.mod
+++ b/gopls/go.mod
@@ -13,7 +13,7 @@
 	golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
 	golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e
 	golang.org/x/text v0.3.7 // indirect
-	golang.org/x/tools v0.1.5
+	golang.org/x/tools v0.1.6-0.20210908190839-cf92b39a962c
 	golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
 	honnef.co/go/tools v0.2.0
 	mvdan.cc/gofumpt v0.1.1
diff --git a/gopls/go.sum b/gopls/go.sum
index f026fde..911b00e 100644
--- a/gopls/go.sum
+++ b/gopls/go.sum
@@ -29,19 +29,28 @@
 github.com/stretchr/testify v0.0.0-20161117074351-18a02ba4a312/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
 github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
 github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
+github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
 github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
 golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
 golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
 golang.org/x/mod v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo=
 golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
 golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
 golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
+golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
 golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
 golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e h1:WUoyKPm6nCo1BnNUvPGnFG3T5DUVem42yDJZZ4CNxMA=
 golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
@@ -51,6 +60,13 @@
 golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
 golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
 golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
+golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20210101214203-2dba1e4ea05c/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
+golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
+golang.org/x/tools v0.1.6-0.20210908190839-cf92b39a962c h1:C0nyHiBU2m0cR6hDiUORWqQIt3h37wsp1255QBSSXqY=
+golang.org/x/tools v0.1.6-0.20210908190839-cf92b39a962c/go.mod h1:YD9qOF0M9xpSpdWTBbzEl5e/RnCefISl8E5Noe10jFM=
+golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
diff --git a/internal/lsp/debug/info.go b/internal/lsp/debug/info.go
index 6d4861c..65314c5 100644
--- a/internal/lsp/debug/info.go
+++ b/internal/lsp/debug/info.go
@@ -26,7 +26,7 @@
 )
 
 // Version is a manually-updated mechanism for tracking versions.
-const Version = "master"
+const Version = "v0.7.2"
 
 // ServerVersion is the format used by gopls to report its version to the
 // client. This format is structured so that the client can parse it easily.