aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2023-06-23 13:23:01 -0700
committerSameer Ajmani <sameer@golang.org>2023-06-26 12:57:55 +0000
commitf5015b5164d6948266df74943f26c4007c6bea50 (patch)
treeac086c8e7f070082bed275c5552489620deaaa8e
parenta031f4ef83edc132d5f49382bfef491161de2476 (diff)
downloadgo-f5015b5164d6948266df74943f26c4007c6bea50.tar.gz
go-f5015b5164d6948266df74943f26c4007c6bea50.zip
doc/go1.21: context.Background and TODO may now appear equal
Fixes #60978 Change-Id: I3e4bd366dc30ac435698b8f17170695330034683 Reviewed-on: https://go-review.googlesource.com/c/go/+/505795 TryBot-Bypass: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Sameer Ajmani <sameer@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com>
-rw-r--r--doc/go1.21.html10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/go1.21.html b/doc/go1.21.html
index cbba30975e..d3c1d13647 100644
--- a/doc/go1.21.html
+++ b/doc/go1.21.html
@@ -473,6 +473,16 @@ Do not send CLs removing the interior tags from such phrases.
The new <a href="/pkg/context/#AfterFunc"><code>AfterFunc</code></a>
function registers a function to run after a context has been cancelled.
</p>
+
+ <p><!-- CL 455455 -->
+ An optimization means that the results of calling
+ <a href="/pkg/context/#Background"><code>Background</code></a>
+ and <a href="/pkg/context/#TODO"><code>TODO</code></a> and
+ converting them to a shared type can be considered equal.
+ In previous releases they were always different. Comparing
+ <a href="/pkg/context/#Context"><code>Context</code></a> values
+ for equality has never been well-defined, so this is not
+ considered to be an incompatible change.
</dd>
</dl>