diff options
| author | Ralf Jung <post@ralfj.de> | 2022-07-12 11:56:35 -0400 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2022-07-12 11:56:35 -0400 |
| commit | 7b4149474b2fdf8b30cb99fdd17303b94746ebce (patch) | |
| tree | d8e195ba1d34ce69b077984d49274a89d277e160 | |
| parent | 84ff4da7267bc9fdb3a423a25cb7947333388ead (diff) | |
| download | rust-7b4149474b2fdf8b30cb99fdd17303b94746ebce.tar.gz rust-7b4149474b2fdf8b30cb99fdd17303b94746ebce.zip | |
mention mitigation in the docs
| -rw-r--r-- | library/core/src/mem/mod.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/library/core/src/mem/mod.rs b/library/core/src/mem/mod.rs index 1e665896a5a..31f44e37118 100644 --- a/library/core/src/mem/mod.rs +++ b/library/core/src/mem/mod.rs @@ -654,6 +654,8 @@ pub unsafe fn zeroed<T>() -> T { /// produce a value of type `T`, while doing nothing at all. /// /// **This function is deprecated.** Use [`MaybeUninit<T>`] instead. +/// It also might be slower than using `MaybeUninit<T>` due to mitigations that were put in place to +/// limit the potential harm caused by incorrect use of this function in legacy code. /// /// The reason for deprecation is that the function basically cannot be used /// correctly: it has the same effect as [`MaybeUninit::uninit().assume_init()`][uninit]. |
