]> Cypherpunks.ru repositories - gostls13.git/commit
go/types, types2: use "and not used" instead of "but not used" in error messages
authorRobert Griesemer <gri@golang.org>
Wed, 21 Sep 2022 21:25:34 +0000 (14:25 -0700)
committerGopher Robot <gobot@golang.org>
Tue, 27 Sep 2022 21:10:19 +0000 (21:10 +0000)
commit4360fd8d6fc6cd23f56b694a91ccf751896eb712
treec0addd4e7b9efd461074cf404a59822a1a5dcca8
parent871a3a409ac55fdcaf329596023e56be279b1950
go/types, types2: use "and not used" instead of "but not used" in error messages

This matches longstanding compiler behavior.

Also, for unused packages, report:

`"pkg" imported and not used`
`"pkg" imported as X and not used`

This matches the other `X declared and not used` errors.

For #55326.

Change-Id: Ie71cf662fb5f4648449c64fc51bede298a1bdcbf
Reviewed-on: https://go-review.googlesource.com/c/go/+/432557
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Run-TryBot: Robert Griesemer <gri@google.com>
36 files changed:
src/cmd/compile/internal/types2/assignments.go
src/cmd/compile/internal/types2/errorcodes.go
src/cmd/compile/internal/types2/issues_test.go
src/cmd/compile/internal/types2/labels.go
src/cmd/compile/internal/types2/resolver.go
src/cmd/compile/internal/types2/stmt.go
src/go/types/assignments.go
src/go/types/errorcodes.go
src/go/types/issues_test.go
src/go/types/labels.go
src/go/types/resolver.go
src/go/types/stmt.go
src/internal/types/testdata/check/importdecl0/importdecl0a.go
src/internal/types/testdata/check/importdecl0/importdecl0b.go
src/internal/types/testdata/check/importdecl1/importdecl1b.go
src/internal/types/testdata/check/issues0.go
src/internal/types/testdata/check/labels.go
src/internal/types/testdata/check/stmt0.go
src/internal/types/testdata/check/vardecl.go
src/internal/types/testdata/fixedbugs/issue39634.go
src/internal/types/testdata/fixedbugs/issue43109.go
test/fixedbugs/bug373.go
test/fixedbugs/bug450.go
test/fixedbugs/issue13415.go
test/fixedbugs/issue13539.go
test/fixedbugs/issue18915.go
test/fixedbugs/issue20185.go
test/fixedbugs/issue21317.go
test/fixedbugs/issue22794.go
test/fixedbugs/issue23116.go
test/fixedbugs/issue23586.go
test/fixedbugs/issue29870b.go
test/fixedbugs/issue5957.dir/c.go
test/import1.go
test/import4.dir/import4.go
test/typeswitch2b.go