Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardRustraw pointers and UnsafeCellSingle-choice MCQ

What does this snippet expose about the layout/aliasing semantics of `UnsafeCell`?

use std::cell::UnsafeCell; use std::mem::{size_of, align_of}; fn main() { println!("{} {}", size_of::<UnsafeCell<u64>>(), align_of::<UnsafeCell<u64>>()); println!("{} {}", size_of::<u64>(), align_of::<u64>()); }