From: Cuong Manh Le Date: Wed, 11 Oct 2023 08:34:09 +0000 (+0700) Subject: types2, go/types: remove doc link from Func.Pkg comment X-Git-Tag: go1.22rc1~630 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=e12bdc80f2d8b2fa243a7dc362a5dc2a4b545d1e;p=gostls13.git types2, go/types: remove doc link from Func.Pkg comment The documentation link only works with exported identifiers. Further, the built-in error interface lives in pseudo package "builtin" only, thus it's not a real package that can be referred using doc links. Change-Id: I2116beb27fc73ba33f8352301fe77b4b6abc3ec1 Reviewed-on: https://go-review.googlesource.com/c/go/+/534436 Reviewed-by: Robert Findley LUCI-TryBot-Result: Go LUCI Auto-Submit: Cuong Manh Le Reviewed-by: Alan Donovan --- diff --git a/src/cmd/compile/internal/types2/object.go b/src/cmd/compile/internal/types2/object.go index 075712dc9c..591adeac3d 100644 --- a/src/cmd/compile/internal/types2/object.go +++ b/src/cmd/compile/internal/types2/object.go @@ -409,7 +409,7 @@ func (obj *Func) Origin() *Func { // Pkg returns the package to which the function belongs. // // The result is nil for methods of types in the Universe scope, -// like [error.Error]. +// like method Error of the error built-in interface type. func (obj *Func) Pkg() *Package { return obj.object.Pkg() } // hasPtrRecv reports whether the receiver is of the form *T for the given method obj. diff --git a/src/go/types/object.go b/src/go/types/object.go index 17c15d48b4..41fabfd051 100644 --- a/src/go/types/object.go +++ b/src/go/types/object.go @@ -411,7 +411,7 @@ func (obj *Func) Origin() *Func { // Pkg returns the package to which the function belongs. // // The result is nil for methods of types in the Universe scope, -// like [error.Error]. +// like method Error of the error built-in interface type. func (obj *Func) Pkg() *Package { return obj.object.Pkg() } // hasPtrRecv reports whether the receiver is of the form *T for the given method obj.