File tree 2 files changed +4
-0
lines changed
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> { }
2106
2106
unsafe fn data_offset < T : ?Sized > ( ptr : * const T ) -> isize {
2107
2107
// Align the unsized value to the end of the `RcBox`.
2108
2108
// 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.
2109
2111
data_offset_align ( align_of_val ( & * ptr) )
2110
2112
}
2111
2113
Original file line number Diff line number Diff line change @@ -2161,6 +2161,8 @@ impl<T: ?Sized> Unpin for Arc<T> { }
2161
2161
unsafe fn data_offset < T : ?Sized > ( ptr : * const T ) -> isize {
2162
2162
// Align the unsized value to the end of the `ArcInner`.
2163
2163
// 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.
2164
2166
data_offset_align ( align_of_val ( & * ptr) )
2165
2167
}
2166
2168
You can’t perform that action at this time.
0 commit comments