diff --git a/cmp/compare_test.go b/cmp/compare_test.go index ad03f36..ed46488 100644 --- a/cmp/compare_test.go +++ b/cmp/compare_test.go @@ -518,7 +518,7 @@ func comparerTests() []test { y: map[*pb.Stringer]*pb.Stringer(nil), wantDiff: ` map[*testprotos.Stringer]*testprotos.Stringer( -- {⟪0xdeadf00f⟫: s"world"}, +- {s"hello": s"world"}, + nil, ) `, diff --git a/cmp/report_reflect.go b/cmp/report_reflect.go index 5521c60..2761b62 100644 --- a/cmp/report_reflect.go +++ b/cmp/report_reflect.go @@ -208,7 +208,6 @@ func (opts formatOptions) FormatValue(v reflect.Value, m visitedPointers) (out t func formatMapKey(v reflect.Value) string { var opts formatOptions opts.TypeMode = elideType - opts.AvoidStringer = true opts.ShallowPointers = true s := opts.FormatValue(v, visitedPointers{}).String() return strings.TrimSpace(s)