Skip to content

Commit aa157ee

Browse files
authored
Unrolled build for rust-lang#140341
Rollup merge of rust-lang#140341 - saethlin:black-box-qoi, r=Mark-Simulacrum Clarify black_box warning a bit Trying to bring the docs on black_box more in line with the advice that we have discussed in Zulip. rust-lang#140341 (comment)
2 parents 50aa041 + f501775 commit aa157ee

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

library/core/src/hint.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,10 @@ 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+
/// (There is also no such mechanism in LLVM, so the same is true for every other LLVM-based compiler.)
326+
///
323327
/// </div>
324328
///
325329
/// [`std::convert::identity`]: crate::convert::identity

0 commit comments

Comments
 (0)