Skip to content

Commit 6f7ca32

Browse files
committed
black_box doc corrections - Issue #107957
1 parent 07c993e commit 6f7ca32

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

library/core/src/hint.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,12 +223,12 @@ pub fn spin_loop() {
223223
///
224224
/// # When is this useful?
225225
///
226-
/// First and foremost: `black_box` does _not_ guarantee any exact behavior and, in some cases, may
227-
/// do nothing at all. As such, it **must not be relied upon to control critical program behavior.**
226+
/// First and foremost: `black_box` does _not_ guarantee any exact behavior beyond behaving as the identity function
227+
/// and, in some cases, does nothing at all. As such, it **must not be relied upon to control critical program behavior.**
228228
/// This _immediately_ precludes any direct use of this function for cryptographic or security
229229
/// purposes.
230230
///
231-
/// While not suitable in those mission-critical cases, `back_box`'s functionality can generally be
231+
/// While not suitable in those mission-critical cases, `black_box`'s functionality can generally be
232232
/// relied upon for benchmarking, and should be used there. It will try to ensure that the
233233
/// compiler doesn't optimize away part of the intended test code based on context. For
234234
/// example:

0 commit comments

Comments
 (0)