File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -2106,6 +2106,8 @@ impl<T: ?Sized> Unpin for Rc<T> { }
21062106unsafe fn data_offset < T : ?Sized > ( ptr : * const T ) -> isize {
21072107 // Align the unsized value to the end of the `RcBox`.
21082108 // Because it is ?Sized, it will always be the last field in memory.
2109+ // Note: This is a detail of the current implementation of the compiler,
2110+ // and is not a guaranteed language detail. Do not rely on it outside of std.
21092111 data_offset_align ( align_of_val ( & * ptr) )
21102112}
21112113
Original file line number Diff line number Diff line change @@ -2161,6 +2161,8 @@ impl<T: ?Sized> Unpin for Arc<T> { }
21612161unsafe fn data_offset < T : ?Sized > ( ptr : * const T ) -> isize {
21622162 // Align the unsized value to the end of the `ArcInner`.
21632163 // Because it is `?Sized`, it will always be the last field in memory.
2164+ // Note: This is a detail of the current implementation of the compiler,
2165+ // and is not a guaranteed language detail. Do not rely on it outside of std.
21642166 data_offset_align ( align_of_val ( & * ptr) )
21652167}
21662168
You can’t perform that action at this time.
0 commit comments