File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -259,6 +259,10 @@ use crate::vec::Vec;
259
259
#[ cfg( test) ]
260
260
mod tests;
261
261
262
+ // This is repr(C) to future-proof against possible field-reordering, which
263
+ // would interfere with otherwise safe [into|from]_raw() of transmutable
264
+ // inner types.
265
+ #[ repr( C ) ]
262
266
struct RcBox < T : ?Sized > {
263
267
strong : Cell < usize > ,
264
268
weak : Cell < usize > ,
Original file line number Diff line number Diff line change @@ -270,6 +270,10 @@ impl<T: ?Sized + fmt::Debug> fmt::Debug for Weak<T> {
270
270
}
271
271
}
272
272
273
+ // This is repr(C) to future-proof against possible field-reordering, which
274
+ // would interfere with otherwise safe [into|from]_raw() of transmutable
275
+ // inner types.
276
+ #[ repr( C ) ]
273
277
struct ArcInner < T : ?Sized > {
274
278
strong : atomic:: AtomicUsize ,
275
279
You can’t perform that action at this time.
0 commit comments