[dev.inline] cmd/internal/src: introduce NoPos and use it instead Pos{}

Using a variable instead of a composite literal makes
the code independent of implementation changes of Pos.

Per David Lazar's suggestion.

Change-Id: I336967ac12a027c51a728a58ac6207cb5119af4a
Reviewed-on: https://go-review.googlesource.com/34148
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
Robert Griesemer 2016-12-08 15:19:47 -08:00
parent c10499b539
commit eaca0e0529
11 changed files with 24 additions and 21 deletions

View file

@ -129,7 +129,7 @@ func (f *Func) dumpFile(phaseName string) {
fi, err := os.Create(fname)
if err != nil {
f.Config.Warnl(src.Pos{}, "Unable to create after-phase dump file %s", fname)
f.Config.Warnl(src.NoPos, "Unable to create after-phase dump file %s", fname)
return
}