#81760·Go

x/tools: support for go1.28's rejection of string(int) conversions

Author: adonovanCreated Sep 25, 2026Updated Sep 28, 2026
LabelsTools

Since #3939 was accepted, we need to ensure the tools are up to date. This issue tracks that work. I don't think it should be much, but a few items come to mind:

  • The inliner now has to deal with the possibility that inlining a function body from an file using an older dialect of Go, in which string(int) conversions are valid, into a file using a newer version, may break. (It already handles the converse problem.)
  • The stringintconv analyzer will need auditing.
  • We'll need a modernizer that preserves the existing behavior. (stringintconv offers two fixes, between which the user must choose, and for this reason it is omitted from the go fix suite. If its default fix is behavior preserving, then it can be enabled by default.)