diff --git a/api/go1.18.txt b/api/go1.18.txt index 2d05c3f41c..7a81ce259e 100644 --- a/api/go1.18.txt +++ b/api/go1.18.txt @@ -1,12 +1,6 @@ pkg bufio, method (*Writer) AvailableBuffer() []uint8 pkg bufio, method (ReadWriter) AvailableBuffer() []uint8 pkg bytes, func Cut([]uint8, []uint8) ([]uint8, []uint8, bool) -pkg constraints, type Complex interface {} -pkg constraints, type Float interface {} -pkg constraints, type Integer interface {} -pkg constraints, type Ordered interface {} -pkg constraints, type Signed interface {} -pkg constraints, type Unsigned interface {} pkg crypto/tls, method (*Conn) NetConn() net.Conn pkg debug/buildinfo, func Read(io.ReaderAt) (*debug.BuildInfo, error) pkg debug/buildinfo, func ReadFile(string) (*debug.BuildInfo, error) diff --git a/doc/go1.18.html b/doc/go1.18.html index e69113411e..ed32a93bc3 100644 --- a/doc/go1.18.html +++ b/doc/go1.18.html @@ -90,6 +90,39 @@ Do not send CLs removing the interior tags from such phrases. +

+ There are three experimental packages using generics that may be + useful. + These packages are in x/exp repository; their API is not covered by + the Go 1 guarantee and may change as we gain more experience with + generics. +

+
golang.org/x/exp/constraints
+
+

+ Constraints that are useful for generic code, such as + constraints.Ordered. +

+
+ +
golang.org/x/exp/slices
+
+

+ A collection of generic functions that operate on slices of + any element type. +

+
+ +
golang.org/x/exp/maps
+
+

+ A collection of generic functions that operate on maps of + any key or element type. +

+
+
+

+

The current generics implementation has the following limitations: