mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Rollup merge of #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. https://github.com/rust-lang/rust/pull/140341#issuecomment-2832592382
This commit is contained in:
@@ -320,6 +320,10 @@ pub fn spin_loop() {
|
||||
/// This also means that this function does not offer any guarantees for cryptographic or security
|
||||
/// purposes.
|
||||
///
|
||||
/// This limitation is not specific to `black_box`; there is no mechanism in the entire Rust
|
||||
/// language that can provide the guarantees required for constant-time cryptography.
|
||||
/// (There is also no such mechanism in LLVM, so the same is true for every other LLVM-based compiler.)
|
||||
///
|
||||
/// </div>
|
||||
///
|
||||
/// [`std::convert::identity`]: crate::convert::identity
|
||||
|
||||
Reference in New Issue
Block a user