Skip to content

Commit 29621ba

Browse files
committed
clarify correctness of black_box
1 parent 999ac5f commit 29621ba

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: library/core/src/hint.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,8 @@ pub fn spin_loop() {
216216
///
217217
/// Note however, that `black_box` is only (and can only be) provided on a "best-effort" basis. The
218218
/// extent to which it can block optimisations may vary depending upon the platform and code-gen
219-
/// backend used. Programs cannot rely on `black_box` for *correctness* in any way.
219+
/// backend used. Programs cannot rely on `black_box` for *correctness*, beyond it behaving as the
220+
/// identity function.
220221
///
221222
/// [`std::convert::identity`]: crate::convert::identity
222223
///

0 commit comments

Comments
 (0)