Skip to content

Commit 206ee87

Browse files
committed
[release-branch.go1.13] cmd: update golang.org/x/tools to v0.0.0-20200615191743-991d59a616de
This teaches vet to recognize the new formats %#b and %O on integers, %x on float/complex. They have been supported since the 1.13 release, but vet would warn about it. Also update cmd/vet testdata accordingly, as was done in CL 202083. Fixes #39287. For #29986. Change-Id: Ia7817ee60ae6beac32cc402c0c68afa917e4ef0f Reviewed-on: https://go-review.googlesource.com/c/go/+/238018 Run-TryBot: Dmitri Shuralyov <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent 7e87a63 commit 206ee87

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

src/cmd/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ require (
88
golang.org/x/arch v0.0.0-20190815191158-8a70ba74b3a1
99
golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c
1010
golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82 // indirect
11-
golang.org/x/tools v0.0.0-20190611154301-25a4f137592f
11+
golang.org/x/tools v0.0.0-20200615191743-991d59a616de
1212
)

src/cmd/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82 h1:vsphBvatvfbhlb4PO1BYSr9dz
1515
golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
1616
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
1717
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
18-
golang.org/x/tools v0.0.0-20190611154301-25a4f137592f h1:6awn5JC4pwVI5HiBqs7MDtRxnwV9PpO5iSA9v6P09pA=
19-
golang.org/x/tools v0.0.0-20190611154301-25a4f137592f/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
18+
golang.org/x/tools v0.0.0-20200615191743-991d59a616de h1:kFKSx8iHlOzmtGWtfJW+b2UzcJ+rMWHHyUBpjrZq8To=
19+
golang.org/x/tools v0.0.0-20200615191743-991d59a616de/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
2020
rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=

src/cmd/vendor/golang.org/x/tools/go/analysis/passes/printf/printf.go

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/cmd/vendor/modules.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ golang.org/x/crypto/ssh/terminal
2626
# golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82
2727
golang.org/x/sys/unix
2828
golang.org/x/sys/windows
29-
# golang.org/x/tools v0.0.0-20190611154301-25a4f137592f
29+
# golang.org/x/tools v0.0.0-20200615191743-991d59a616de
3030
golang.org/x/tools/go/analysis
3131
golang.org/x/tools/go/analysis/internal/analysisflags
3232
golang.org/x/tools/go/analysis/internal/facts

src/cmd/vet/testdata/print/print.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ func PrintfTests() {
8181
fmt.Printf("%T %T", 3, i)
8282
fmt.Printf("%U %U", 3, i)
8383
fmt.Printf("%v %v", 3, i)
84-
fmt.Printf("%x %x %x %x", 3, i, "hi", s)
85-
fmt.Printf("%X %X %X %X", 3, i, "hi", s)
84+
fmt.Printf("%x %x %x %x %x %x %x", 3, i, "hi", s, x, c, fslice)
85+
fmt.Printf("%X %X %X %X %X %X %X", 3, i, "hi", s, x, c, fslice)
8686
fmt.Printf("%.*s %d %g", 3, "hi", 23, 2.3)
8787
fmt.Printf("%s", &stringerv)
8888
fmt.Printf("%v", &stringerv)
@@ -125,7 +125,6 @@ func PrintfTests() {
125125
fmt.Printf("%t", 23) // ERROR "Printf format %t has arg 23 of wrong type int"
126126
fmt.Printf("%U", x) // ERROR "Printf format %U has arg x of wrong type float64"
127127
fmt.Printf("%x", nil) // ERROR "Printf format %x has arg nil of wrong type untyped nil"
128-
fmt.Printf("%X", 2.3) // ERROR "Printf format %X has arg 2.3 of wrong type float64"
129128
fmt.Printf("%s", stringerv) // ERROR "Printf format %s has arg stringerv of wrong type .*print.ptrStringer"
130129
fmt.Printf("%t", stringerv) // ERROR "Printf format %t has arg stringerv of wrong type .*print.ptrStringer"
131130
fmt.Printf("%s", embeddedStringerv) // ERROR "Printf format %s has arg embeddedStringerv of wrong type .*print.embeddedStringer"

0 commit comments

Comments
 (0)