Skip to content

Commit 8e699c5

Browse files
committed
fixup become kw documentation wrt #[track_caller]
1 parent 55522ed commit 8e699c5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

library/std/src/keyword_docs.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1323,7 +1323,10 @@ mod return_keyword {}
13231323
/// currently has these requirements:
13241324
/// 1. callee and caller must have the same ABI, arguments, and return type
13251325
/// 2. callee and caller must not have varargs
1326-
/// 3. callee and caller must not be marked with `#[track_caller]`
1326+
/// 3. caller must not be marked with `#[track_caller]`
1327+
/// - callee is allowed to be marked with `#[track_caller]` as otherwise
1328+
/// adding `#[track_caller]` would be a breaking change. if callee is
1329+
/// marked with `#[track_caller]` a tail call is not guaranteed.
13271330
/// 4. callee and caller cannot be a closure
13281331
/// (unless it's coerced to a function pointer)
13291332
///

0 commit comments

Comments
 (0)