func (r *renamer) checkLabel(label *types.Label) { // Check there are no identical labels in the function's label block. // (Label blocks don't nest, so this is easy.) if prev := label.Parent().Lookup(r.to); prev != nil { r.errorf(label.Pos(), "renaming this label %q to %q", label.Name(), prev.Name()) r.errorf(prev.Pos(), "\twould conflict with this one") } }