This commit is contained in:
Ralf Jung 2018-07-23 12:53:37 +02:00
parent 33b8f6253f
commit a303741334
2 changed files with 4 additions and 4 deletions

View File

@ -1158,8 +1158,8 @@ pub struct Weak<T: ?Sized> {
// This is a `NonNull` to allow optimizing the size of this type in enums,
// but it is not necessarily a valid pointer.
// `Weak::new` sets this to `usize::MAX` so that it doesnt need
// to allocate space on the heap. That's not a value a real poiner
// will ever have because RcBox has alignment at least 4.
// to allocate space on the heap. That's not a value a real pointer
// will ever have because RcBox has alignment at least 2.
ptr: NonNull<RcBox<T>>,
}

View File

@ -239,8 +239,8 @@ pub struct Weak<T: ?Sized> {
// This is a `NonNull` to allow optimizing the size of this type in enums,
// but it is not necessarily a valid pointer.
// `Weak::new` sets this to `usize::MAX` so that it doesnt need
// to allocate space on the heap. That's not a value a real poiner
// will ever have because RcBox has alignment at least 4.
// to allocate space on the heap. That's not a value a real pointer
// will ever have because RcBox has alignment at least 2.
ptr: NonNull<ArcInner<T>>,
}