File tree Expand file tree Collapse file tree 2 files changed +2
-0
lines changed Expand file tree Collapse file tree 2 files changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -1641,6 +1641,7 @@ pub struct Weak<T: ?Sized> {
16411641 // `Weak::new` sets this to `usize::MAX` so that it doesn’t need
16421642 // to allocate space on the heap. That's not a value a real pointer
16431643 // will ever have because RcBox has alignment at least 2.
1644+ // This is only possible when `T: Sized`; unsized `T` never dangle.
16441645 ptr : NonNull < RcBox < T > > ,
16451646}
16461647
Original file line number Diff line number Diff line change @@ -267,6 +267,7 @@ pub struct Weak<T: ?Sized> {
267267 // `Weak::new` sets this to `usize::MAX` so that it doesn’t need
268268 // to allocate space on the heap. That's not a value a real pointer
269269 // will ever have because RcBox has alignment at least 2.
270+ // This is only possible when `T: Sized`; unsized `T` never dangle.
270271 ptr : NonNull < ArcInner < T > > ,
271272}
272273
You can’t perform that action at this time.
0 commit comments