diff options
| author | Nils Liberg <nils@nilsliberg.se> | 2019-09-27 13:54:05 +0200 |
|---|---|---|
| committer | Nils Liberg <nils@nilsliberg.se> | 2019-09-28 11:49:45 +0200 |
| commit | fd505d7fd52983a374f4087f46e2ae490b9cdb86 (patch) | |
| tree | f39859e7e4b18014c97051168e3f6a87080f9af6 /src/libcore | |
| parent | 59367b074f1523353dddefa678ffe3cac9fd4e50 (diff) | |
| download | rust-fd505d7fd52983a374f4087f46e2ae490b9cdb86.tar.gz rust-fd505d7fd52983a374f4087f46e2ae490b9cdb86.zip | |
Improve wording in documentation of MaybeUninit
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/mem/maybe_uninit.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libcore/mem/maybe_uninit.rs b/src/libcore/mem/maybe_uninit.rs index 9e9e901c76d..792ce9dfad4 100644 --- a/src/libcore/mem/maybe_uninit.rs +++ b/src/libcore/mem/maybe_uninit.rs @@ -5,12 +5,12 @@ use crate::mem::ManuallyDrop; /// /// # Initialization invariant /// -/// The compiler, in general, assumes that variables are properly initialized -/// at their respective type. For example, a variable of reference type must -/// be aligned and non-NULL. This is an invariant that must *always* be upheld, -/// even in unsafe code. As a consequence, zero-initializing a variable of reference -/// type causes instantaneous [undefined behavior][ub], no matter whether that reference -/// ever gets used to access memory: +/// The compiler, in general, assumes that a variable is properly initialized +/// according to the requirements of the variable's type. For example, a variable of +/// reference type must be aligned and non-NULL. This is an invariant that must +/// *always* be upheld, even in unsafe code. As a consequence, zero-initializing a +/// variable of reference type causes instantaneous [undefined behavior][ub], +/// no matter whether that reference ever gets used to access memory: /// /// ```rust,no_run /// # #![allow(invalid_value)] |
