File tree 1 file changed +10
-1
lines changed
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,8 @@ use crate::mem::ManuallyDrop;
51
51
///
52
52
/// On top of that, remember that most types have additional invariants beyond merely
53
53
/// being considered initialized at the type level. For example, a `1`-initialized [`Vec<T>`]
54
- /// is considered initialized because the only requirement the compiler knows about it
54
+ /// is considered initialized (under the current implementation; this does not constitute
55
+ /// a stable guarantee) because the only requirement the compiler knows about it
55
56
/// is that the data pointer must be non-null. Creating such a `Vec<T>` does not cause
56
57
/// *immediate* undefined behavior, but will cause undefined behavior with most
57
58
/// safe operations (including dropping it).
@@ -402,6 +403,14 @@ impl<T> MaybeUninit<T> {
402
403
///
403
404
/// [inv]: #initialization-invariant
404
405
///
406
+ /// On top of that, remember that most types have additional invariants beyond merely
407
+ /// being considered initialized at the type level. For example, a `1`-initialized [`Vec<T>`]
408
+ /// is considered initialized (under the current implementation; this does not constitute
409
+ /// a stable guarantee) because the only requirement the compiler knows about it
410
+ /// is that the data pointer must be non-null. Creating such a `Vec<T>` does not cause
411
+ /// *immediate* undefined behavior, but will cause undefined behavior with most
412
+ /// safe operations (including dropping it).
413
+ ///
405
414
/// # Examples
406
415
///
407
416
/// Correct usage of this method:
You can’t perform that action at this time.
0 commit comments