Skip to content

Commit

Permalink
black_box doc corrections - Issue rust-lang#107957
Browse files Browse the repository at this point in the history
  • Loading branch information
pat-nel87 committed Feb 24, 2023
1 parent 07c993e commit 6f7ca32
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions library/core/src/hint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,12 @@ pub fn spin_loop() {
///
/// # When is this useful?
///
/// First and foremost: `black_box` does _not_ guarantee any exact behavior and, in some cases, may
/// do nothing at all. As such, it **must not be relied upon to control critical program behavior.**
/// First and foremost: `black_box` does _not_ guarantee any exact behavior beyond behaving as the identity function
/// and, in some cases, does nothing at all. As such, it **must not be relied upon to control critical program behavior.**
/// This _immediately_ precludes any direct use of this function for cryptographic or security
/// purposes.
///
/// While not suitable in those mission-critical cases, `back_box`'s functionality can generally be
/// While not suitable in those mission-critical cases, `black_box`'s functionality can generally be
/// relied upon for benchmarking, and should be used there. It will try to ensure that the
/// compiler doesn't optimize away part of the intended test code based on context. For
/// example:
Expand Down

0 comments on commit 6f7ca32

Please sign in to comment.