File tree 2 files changed +2
-0
lines changed
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> {
1641
1641
// `Weak::new` sets this to `usize::MAX` so that it doesn’t need
1642
1642
// to allocate space on the heap. That's not a value a real pointer
1643
1643
// will ever have because RcBox has alignment at least 2.
1644
+ // This is only possible when `T: Sized`; unsized `T` never dangle.
1644
1645
ptr : NonNull < RcBox < T > > ,
1645
1646
}
1646
1647
Original file line number Diff line number Diff line change @@ -267,6 +267,7 @@ pub struct Weak<T: ?Sized> {
267
267
// `Weak::new` sets this to `usize::MAX` so that it doesn’t need
268
268
// to allocate space on the heap. That's not a value a real pointer
269
269
// will ever have because RcBox has alignment at least 2.
270
+ // This is only possible when `T: Sized`; unsized `T` never dangle.
270
271
ptr : NonNull < ArcInner < T > > ,
271
272
}
272
273
You can’t perform that action at this time.
0 commit comments