mirror of
https://github.com/golang/go
synced 2024-09-15 22:20:06 +00:00
types2: use strings.Builder in errors.go
Permissible now because go1.17 is used for bootstrapping. Change-Id: Ia6f314f9314eda1cc42002dcbdfa551196df76f0 Reviewed-on: https://go-review.googlesource.com/c/go/+/427554 TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Robert Griesemer <gri@google.com> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> Run-TryBot: Robert Griesemer <gri@google.com> Reviewed-by: Robert Griesemer <gri@google.com> Run-TryBot: hopehook <hopehook@golangcn.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
1280ae7856
commit
b2110bcdde
|
@ -300,8 +300,7 @@ func posFor(at poser) syntax.Pos {
|
|||
|
||||
// stripAnnotations removes internal (type) annotations from s.
|
||||
func stripAnnotations(s string) string {
|
||||
// Would like to use strings.Builder but it's not available in Go 1.4.
|
||||
var b bytes.Buffer
|
||||
var b strings.Builder
|
||||
for _, r := range s {
|
||||
// strip #'s and subscript digits
|
||||
if r < '₀' || '₀'+10 <= r { // '₀' == U+2080
|
||||
|
|
Loading…
Reference in a new issue