diff --git a/cmp/compare.go b/cmp/compare.go index 119af26..b98a256 100644 --- a/cmp/compare.go +++ b/cmp/compare.go @@ -58,8 +58,10 @@ import ( // // - If the values have an Equal method of the form "(T) Equal(T) bool" or // "(T) Equal(I) bool" where T is assignable to I, then use the result of -// x.Equal(y) even if x or y is nil. Otherwise, no such method exists and -// evaluation proceeds to the next rule. +// x.Equal(y) when both values are non-nil. If either value is nil, Equal +// reports whether both are nil without calling the method (so a nil +// receiver never panics). Otherwise, no such method exists and evaluation +// proceeds to the next rule. // // - Lastly, try to compare x and y based on their basic kinds. // Simple kinds like booleans, integers, floats, complex numbers, strings,