From 1e12eab8705d1d8d7472be9147a39caa1c8380db Mon Sep 17 00:00:00 2001 From: cui fliter Date: Fri, 22 Mar 2024 23:31:44 +0800 Subject: all: fix a large number of comments Partial typo corrections, following https://go.dev/wiki/Spelling Change-Id: I2357906ff2ea04305c6357418e4e9556e20375d1 Reviewed-on: https://go-review.googlesource.com/c/go/+/573776 LUCI-TryBot-Result: Go LUCI TryBot-Result: Gopher Robot Reviewed-by: Than McIntosh Run-TryBot: shuang cui Reviewed-by: Ian Lance Taylor Auto-Submit: Ian Lance Taylor --- test/typeparam/graph.go | 5 +++-- test/typeparam/list2.go | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/typeparam/graph.go b/test/typeparam/graph.go index 5cd1faa76f..544318647b 100644 --- a/test/typeparam/graph.go +++ b/test/typeparam/graph.go @@ -11,7 +11,7 @@ import ( "fmt" ) -// _Equal reports whether two slices are equal: the same length and all +// _SliceEqual reports whether two slices are equal: the same length and all // elements equal. All floating point NaNs are considered equal. func _SliceEqual[Elem comparable](s1, s2 []Elem) bool { if len(s1) != len(s2) { @@ -42,7 +42,7 @@ type _NodeC[_Edge any] interface { Edges() []_Edge } -// Edgec is the constraints on an edge in a graph, given the _Node type. +// _EdgeC is the constraints on an edge in a graph, given the _Node type. type _EdgeC[_Node any] interface { comparable Nodes() (a, b _Node) @@ -153,6 +153,7 @@ func (m mazeRoom) Edges() []mazeEdge { } // Nodes returns the rooms connected by an edge. +// //go:noinline func (e mazeEdge) Nodes() (mazeRoom, mazeRoom) { m1, ok := zork[e.from] diff --git a/test/typeparam/list2.go b/test/typeparam/list2.go index 111ac787e5..0b976f0b18 100644 --- a/test/typeparam/list2.go +++ b/test/typeparam/list2.go @@ -14,7 +14,7 @@ import ( "strconv" ) -// Element is an element of a linked list. +// _Element is an element of a linked list. type _Element[T any] struct { // Next and previous pointers in the doubly-linked list of elements. // To simplify the implementation, internally a list l is implemented -- cgit v1.2.3-54-g00ecf