Skip to content

Commit fd505d7

Browse files
committed
Improve wording in documentation of MaybeUninit
1 parent 59367b0 commit fd505d7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/libcore/mem/maybe_uninit.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ use crate::mem::ManuallyDrop;
55
///
66
/// # Initialization invariant
77
///
8-
/// The compiler, in general, assumes that variables are properly initialized
9-
/// at their respective type. For example, a variable of reference type must
10-
/// be aligned and non-NULL. This is an invariant that must *always* be upheld,
11-
/// even in unsafe code. As a consequence, zero-initializing a variable of reference
12-
/// type causes instantaneous [undefined behavior][ub], no matter whether that reference
13-
/// ever gets used to access memory:
8+
/// The compiler, in general, assumes that a variable is properly initialized
9+
/// according to the requirements of the variable's type. For example, a variable of
10+
/// reference type must be aligned and non-NULL. This is an invariant that must
11+
/// *always* be upheld, even in unsafe code. As a consequence, zero-initializing a
12+
/// variable of reference type causes instantaneous [undefined behavior][ub],
13+
/// no matter whether that reference ever gets used to access memory:
1414
///
1515
/// ```rust,no_run
1616
/// # #![allow(invalid_value)]

0 commit comments

Comments
 (0)