go/internal/lsp/testdata/rename/issue42134
Shoshin Nikita ccff7327b9 internal/lsp/source: fix comment update during rename for short variable declarations
*ast.AssignStmt doesn't have an associated comment group. So, we should
try to find and return a comment just before the identifier.

Fixes golang/go#42134

Change-Id: Ie40717a4973ccfdbd99c3df891c2cfffbb21742d
GitHub-Last-Rev: da75fde2dbf3613f3325dbc5930dfc84ea813b90
GitHub-Pull-Request: golang/tools#323
Reviewed-on: https://go-review.googlesource.com/c/tools/+/327229
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Trust: Rebecca Stambler <rstambler@golang.org>
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
2021-07-12 21:21:15 +00:00
..
1.go internal/lsp/source: fix comment update during rename for short variable declarations 2021-07-12 21:21:15 +00:00
1.go.golden internal/lsp/source: fix comment update during rename for short variable declarations 2021-07-12 21:21:15 +00:00
2.go internal/lsp/source: fix comment update during rename for short variable declarations 2021-07-12 21:21:15 +00:00
2.go.golden internal/lsp/source: fix comment update during rename for short variable declarations 2021-07-12 21:21:15 +00:00
3.go internal/lsp/source: fix comment update during rename for short variable declarations 2021-07-12 21:21:15 +00:00
3.go.golden internal/lsp/source: fix comment update during rename for short variable declarations 2021-07-12 21:21:15 +00:00
4.go internal/lsp/source: fix comment update during rename for short variable declarations 2021-07-12 21:21:15 +00:00
4.go.golden internal/lsp/source: fix comment update during rename for short variable declarations 2021-07-12 21:21:15 +00:00