Size of `UnsafeCell`

โš“ Rust    ๐Ÿ“… 2025-07-30    ๐Ÿ‘ค surdeus    ๐Ÿ‘๏ธ 13      

surdeus

Warning

This post was published 126 days ago. The information described in this article may have changed.

Info

This post is auto-generated from RSS feed The Rust Programming Language Forum - Latest topics. Source: Size of `UnsafeCell`

In a recent issue, Iโ€™ve noticed the following line:

UnsafeCell<T> can be larger than T in some cases

Could someone give an example of how this is possible? Iโ€™m not sure if I can come up with one off the top of my head, and besides, isnโ€™t being repr(transparent) a soundness property of UnsafeCell?

4 posts - 4 participants

Read full topic

๐Ÿท๏ธ Rust_feed