diff options
| author | pat-nel87 <patnelson2022@gmail.com> | 2023-02-23 19:53:33 -0500 |
|---|---|---|
| committer | pat-nel87 <patnelson2022@gmail.com> | 2023-02-23 19:53:33 -0500 |
| commit | 6f7ca32ae7f5cd9159a986ca0c30b77420cce933 (patch) | |
| tree | 5ad209924234e4587a045f66ee098b1dbbfb9e62 | |
| parent | 07c993eba8b76eae497e98433ae075b00f01be10 (diff) | |
| download | rust-6f7ca32ae7f5cd9159a986ca0c30b77420cce933.tar.gz rust-6f7ca32ae7f5cd9159a986ca0c30b77420cce933.zip | |
black_box doc corrections - Issue #107957
| -rw-r--r-- | library/core/src/hint.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/library/core/src/hint.rs b/library/core/src/hint.rs index ee13dae60b1..f90077eecd1 100644 --- a/library/core/src/hint.rs +++ b/library/core/src/hint.rs @@ -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: |
