Commit 8ee37c6a authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

cmd/compile: eliminate format string FmtUnsigned support

Passes toolstash -cmp.

Change-Id: I678fc40c0f2a6e9a434bcdd4ea17bb7f319a6063
Reviewed-on: https://go-review.googlesource.com/38144
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
parent 84b9329b
......@@ -16,14 +16,11 @@ import (
// See the respective function's documentation for details.
type FmtFlag int
// TODO(gri) The ' ' flag is not used anymore in %-formats.
// Eliminate eventually.
const ( // fmt.Format flag/prec or verb
FmtLeft FmtFlag = 1 << iota // '-'
FmtSharp // '#'
FmtSign // '+'
FmtUnsigned // ' ' (historic: u flag)
FmtUnsigned // internal use only (historic: u flag)
FmtShort // verb == 'S' (historic: h flag)
FmtLong // verb == 'L' (historic: l flag)
FmtComma // '.' (== hasPrec) (historic: , flag)
......@@ -44,7 +41,7 @@ func fmtFlag(s fmt.State, verb rune) FmtFlag {
flag |= FmtSign
}
if s.Flag(' ') {
flag |= FmtUnsigned
Fatalf("FmtUnsigned in format string")
}
if _, ok := s.Precision(); ok {
flag |= FmtComma
......@@ -1701,7 +1698,6 @@ func fldconv(f *Field, flag FmtFlag) string {
// "%L" print definition, not name
// "%S" omit 'func' and receiver from function types, short type names
// "% v" package name, not prefix (FTypeId mode, sticky)
func (t *Type) Format(s fmt.State, verb rune) {
switch verb {
case 'v', 'S', 'L':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment