Skip to content

Commit 23b0106

Browse files
committed
Indicate that the warning on black_box is a general property of Rust
1 parent 5ae50d3 commit 23b0106

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

library/core/src/hint.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,9 @@ pub fn spin_loop() {
320320
/// This also means that this function does not offer any guarantees for cryptographic or security
321321
/// purposes.
322322
///
323+
/// This limitation is not specific to `black_box`; there is no mechanism in the entire Rust
324+
/// language that can provide the guarantees required for constant-time cryptography.
325+
///
323326
/// </div>
324327
///
325328
/// [`std::convert::identity`]: crate::convert::identity

0 commit comments

Comments
 (0)