about summary refs log tree commit diff
diff options
context:
space:
mode:
authorWaffle Lapkin <waffle.lapkin@gmail.com>2025-09-13 19:44:06 +0200
committerWaffle Lapkin <waffle.lapkin@gmail.com>2025-09-13 19:48:10 +0200
commitf13c8c21925d8226811fefaceacd414c9d8f35d9 (patch)
treeea9e97f1c226c8c70b8435fa491a71ff26f8fd4d
parentcc9225406c75a854a9c91bd9f75ed2cbe9cee4c4 (diff)
downloadrust-f13c8c21925d8226811fefaceacd414c9d8f35d9.tar.gz
rust-f13c8c21925d8226811fefaceacd414c9d8f35d9.zip
fixup `become` kw documentation wrt `#[track_caller]`
-rw-r--r--library/std/src/keyword_docs.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/library/std/src/keyword_docs.rs b/library/std/src/keyword_docs.rs
index dc35b05b750..7ff4af8ede8 100644
--- a/library/std/src/keyword_docs.rs
+++ b/library/std/src/keyword_docs.rs
@@ -1323,7 +1323,10 @@ mod return_keyword {}
 /// currently has these requirements:
 /// 1. callee and caller must have the same ABI, arguments, and return type
 /// 2. callee and caller must not have varargs
-/// 3. callee and caller must not be marked with `#[track_caller]`
+/// 3. caller must not be marked with `#[track_caller]`
+///    - callee is allowed to be marked with `#[track_caller]` as otherwise
+///      adding `#[track_caller]` would be a breaking change. if callee is
+///      marked with `#[track_caller]` a tail call is not guaranteed.
 /// 4. callee and caller cannot be a closure
 ///    (unless it's coerced to a function pointer)
 ///