Go version

go version go1.25.1 linux/amd64

Output of go env in your module/workspace:

AR='ar'
CC='gcc'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_ENABLED='1'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
CXX='g++'
GCCGO='gccgo'
GO111MODULE=''
GOAMD64='v4'
GOARCH='amd64'
GOAUTH='netrc'
GOBIN=''
GOCACHE='/home/u/.cache/go-build'
GOCACHEPROG=''
GODEBUG=''
GOENV='/home/u/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFIPS140='off'
GOFLAGS=''
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build3885639297=/tmp/go-build -gno-record-gcc-switches'
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMOD='/home/u/hb/seller-experience/vms/go.mod'
GOMODCACHE='/home/u/go/pkg/mod'
GONOPROXY='gitlab.com/HnBI/*'
GONOSUMDB='gitlab.com/HnBI/*'
GOOS='linux'
GOPATH='/home/u/go'
GOPRIVATE='gitlab.com/HnBI/*'
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/lib/go'
GOSUMDB='sum.golang.org'
GOTELEMETRY='local'
GOTELEMETRYDIR='/home/u/.config/go/telemetry'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/lib/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.25.1'
GOWORK=''
PKG_CONFIG='pkg-config'

What did you do?

I tried to run a go vet linter on code line string(int32(1)).

What did you see happen?

go vet does not report an error: https://go.dev/play/p/ThuI0i8PQ1P

𖢺

Program exited.

What did you expect to see?

I expect vet to emit the same error as string(int(1)) does: https://go.dev/play/p/YeZ1nhgSuK8

# [play]
./prog.go:8:14: conversion from int to string yields a string of one rune, not a string of digits

Go vet failed.

𖢺

Program exited.

Comment From: gabyhelp

Related Issues

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

Comment From: ianlancetaylor

This is intentional. The predeclared type rune is an alias for int32, and plenty of code correctly converts a single rune value to a string.