From 5ee939b8199266446d7ccc563751a9d3db26bf8b Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Mon, 13 Jun 2022 11:06:55 -0700 Subject: [PATCH] spec: clarify behavior of map size hint for make built-in The spec already states that the precise behavior of the map size hint provided to the make built-in is implementation-dependent. Exclude requiring specific run-time behavior for maps. (The current Go compiler does not panic if the size hint is negative at run-time.) Fixes #53219. Change-Id: I2f3618bf9ba4ed921e18dc4f2273eaa770805bd7 Reviewed-on: https://go-review.googlesource.com/c/go/+/411919 Reviewed-by: Keith Randall Reviewed-by: Ian Lance Taylor Reviewed-by: Keith Randall --- doc/go_spec.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/go_spec.html b/doc/go_spec.html index 170c359c87bce..b5f6c5fd6571c 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -7141,7 +7141,7 @@

Making slices, maps and channels

by a value of type int; if it is an untyped constant it is given type int. If both n and m are provided and are constant, then n must be no larger than m. -If n is negative or larger than m at run time, +For slices and channels, if n is negative or larger than m at run time, a run-time panic occurs.